All jobs / Frontend / web developer / Tooling
Frontend / web developer interview question · 0–1 years
Your new team uses both ESLint and Prettier. What does each one do, and why have both?
The strongest answer
Prettier formats — spacing, quotes, line breaks — with no debate; ESLint finds likely bugs and enforces code rules. Run both on save and in CI, with ESLint’s formatting rules off so they don’t fight
Why it works
Right — a formatter and a linter answer different questions: how it looks versus whether it is probably wrong.
What a good answer covers
- Formatter for looks, linter for mistakes.
- Prettier: automatic formatting.
- ESLint: bug patterns and rules.
- Run both on save and in CI.
Answers that fall short
- Close, but not the strongest: Both keep the code style consistent, so they mostly overlap; I run whatever the project has configured
They overlap only on formatting; ESLint’s value is catching real mistakes such as unused variables or suspicious comparisons. - Weak: ESLint is the old tool and Prettier replaced it, so only Prettier is needed
Prettier never looks at logic; it cannot tell you a variable is unused or a promise is never awaited. - Red flag: I disable them locally because the warnings slow me down, and fix things if a reviewer complains
Pushing the tools’ work onto reviewers wastes their time and signals you will bypass other guardrails too.
Who gets asked this
More Tooling questions
- You need to ship a small button-style change. How do you use git?
- CI installed different package versions than your laptop. Strongest fix?
- How do you use DevTools to find out where it fails?
- You need an API base URL in a Vite app without leaking a private key. What do you do?
- Fast Refresh resets a component's state on every edit. What usually caused it?
- A half-rolled feature is erroring in production. Strongest frontend move?
- What does a bundler such as Webpack or Vite’s production build actually do for you, and what breaks tree…
- Three product teams ship the same header with three bugs. How do you organize frontend platform work?