Skip to content
BENIBIX Learn

Prettier vs ESLint

People think Prettier and ESLint do the same job, and they do not. Prettier only changes how code looks: the spaces, the quotes and the line breaks. ESLint looks for code that may be wrong, like a name you set but never use. Most teams run both. Prettier sets the look, and ESLint hunts for bugs.

Development🛠️ Editors & Tools

Prettier

A free tool that tidies the layout of code. It works on JavaScript, CSS, HTML and more.

Prettier is a free tool that sets the layout of your code for you. It works on JavaScript, TypeScript, CSS, HTML, JSON, Markdown, YAML and more. It reads your code, throws away your spacing, and prints it again in one fixed style. It has very few settings on purpose, so a team stops arguing about tabs and quotes. Most people run it each time they save a file.

Example
Lucy and Jack used to fight over quotes in code reviews. Now Prettier runs on save, and every file looks the same.
Why it matters
Reviews can focus on what the code does, not where the spaces go. Every file reads the same.
Full entry
Development🛠️ Editors & Tools

ESLint

A free tool that checks JavaScript code for slips. It does not run the code.

ESLint is a free linter for JavaScript and TypeScript. It reads your code without running it and points out problems. It finds things like a variable you never use, or code that can never run. Each check is a rule, and you turn rules on or off in a file called eslint.config.js. Many problems it can fix by itself.

Example
Jack runs ESLint before he pushes. It warns that he made a variable called total and never used it.
Why it matters
It catches small slips before they reach users. Teams also use it to keep everyone's code in one style.
Full entry

In one line

Prettier
A free tool that tidies the layout of code. It works on JavaScript, CSS, HTML and more.
ESLint
A free tool that checks JavaScript code for slips. It does not run the code.