Because Prettier generally does a better job of formatting than ESLint. This is for three reasons: It's really fast, particularly in comparison to ESLint. Prettier is designed to format documents and that's it, which means it can be a lot simpler than ESLint, at least architecturally, especially as there's relatively little in the way of plugins. So if you just need to format your code quickly in one chunk, Prettier is the way to go. Prettier is already preconfigured, so it's also usually quicker to get started with. ESLint has some default formatting rules IIRC, but relatively minimal ones. To ensure every detail is formatted the same way, you need to put a lot of effort into configuring ESLint, which most people don't really want to do. Related: Conceptually, Prettier formats holistically, which is to say, it takes a whole document and applies its formatting to every single syntax node - generally, this means that you get very close to having exactly one valid output, no matter how the input file is formatted. ESLint, on the other hand, not only requires each formatting rule to be configured individually, but also applies them generally individually, so it's easier to have cases where you can get inconsistent behaviour depending on the original formatting of the file. Answer from MrJohz on reddit.com
🌐
Prettier
prettier.io › docs › integrating-with-linters
Integrating with Linters · Prettier
First, we have plugins that let you run Prettier as if it was a linter rule: eslint-plugin-prettier · stylelint-prettier · These plugins were especially useful when Prettier was new. By running Prettier inside your linters, you didn’t have to set up any new infrastructure and you could re-use your editor integrations for the linters.
🌐
GitHub
github.com › prettier › eslint-config-prettier
GitHub - prettier/eslint-config-prettier: Turns off all rules that are unnecessary or might conflict with Prettier. · GitHub
For eslintrc, while the "prettier" config can disable problematic rules in "some-other-config-you-use", it cannot touch "rules"! (That’s how ESLint works – it lets you override configs you extend.) The CLI helper tool reports that "indent" conflicts with Prettier, so you can remove it.
Author   prettier
🌐
GitHub
github.com › prettier › eslint-plugin-prettier
GitHub - prettier/eslint-plugin-prettier: ESLint plugin for Prettier formatting · GitHub
Runs Prettier as an ESLint rule and reports differences as individual ESLint issues.
Author   prettier
🌐
LogRocket
blog.logrocket.com › home › using prettier and eslint for javascript formatting
Using Prettier and ESLint for JavaScript formatting - LogRocket Blog
October 22, 2024 - ESLint allows rules to be set as errors or warnings and some errors can be automatically fixed. While ESLint can handle some formatting tasks, Prettier offers several advantages that make it a valuable addition to the development workflow.
🌐
npm
npmjs.com › package › eslint-plugin-prettier
eslint-plugin-prettier - npm
Runs Prettier as an ESLint rule and reports differences as individual ESLint issues.
      » npm install eslint-plugin-prettier
    
Published   Jan 14, 2026
Version   5.5.5
Author   Teddy Katz
🌐
Reddit
reddit.com › r/node › why use prettier if eslint can format?
r/node on Reddit: Why use prettier if ESLint can format?
July 27, 2022 -

I've heard ESLint can format but I haven't found a clear answer why it seems prettier is used instead of the ESLint formatter. Whenever I try to look it up most comments neglect to mention that ESLint can also format so it's not obvious why prettier would be needed at all.

🌐
Medium
medium.com › @fabianterh › an-opinionated-guide-to-setting-up-prettier-with-eslint-51809b1b3043
An opinionated guide to setting up Prettier with ESLint | by Fabian Terh | Medium
September 2, 2018 - Install prettier and eslint-plugin-prettier. This is the plugin that is responsible for detecting differences between your code’s formatting and Prettier’s rules.
Find elsewhere
🌐
Robin Wieruch
robinwieruch.de › prettier-eslint
How to use Prettier with ESLint
Prettier makes sure that only single quotes are used and that the line length is set to the given number of characters. In contrast, ESLint needs lots of configuration from your side, because it isn't as opinionated as Prettier.
🌐
Ben Ilegbodu
benmvp.com › blog › prettier-eslint
Prettier + ESLint = ❤️ | Ben Ilegbodu
The plugin:prettier/recommended also turns on the single prettier/prettier rule that validates code format using Prettier. When developing in React, we use eslint-plugin-react for React-specific ESLint rules.
🌐
npm
npmjs.com › package › eslint-config-prettier
eslint-config-prettier - npm
For eslintrc, while the "prettier" config can disable problematic rules in "some-other-config-you-use", it cannot touch "rules"! (That’s how ESLint works – it lets you override configs you extend.) The CLI helper tool reports that "indent" conflicts with Prettier, so you can remove it.
      » npm install eslint-config-prettier
    
Published   Jul 18, 2025
Version   10.1.8
Author   Simon Lydell
Top answer
1 of 2
456

UPDATE 2023: ESLint is deprecating formatting rules and recommend you use a source code formatter instead.

tl;dr: Use eslint-config-prettier in eslint, and run prettier separately. You can ignore the rest.

From v8.53.0 onwards, you will see a deprecation warning if those formatting rules are enabled in your config. You should still use eslint-config-prettier to disable conflicting rules until the rules are removed in a new major release.

ESLint contains many rules and those that are formatting-related might conflict with Prettier, such as arrow-parens, space-before-function-paren, etc. Hence using them together will cause some issues. The following tools have been created to use ESLint and Prettier together.

prettier-eslint eslint-plugin-prettier eslint-config-prettier
What it is A JavaScript module exporting a single function. An ESLint plugin. An ESLint configuration.
What it does Runs the code (string) through prettier then eslint --fix. The output is also a string. Plugins usually contain implementations for additional rules that ESLint will check for. This plugin uses Prettier under the hood and will raise ESLint errors when your code differs from Prettier's expected output. This config turns off formatting-related rules that might conflict with Prettier, allowing you to use Prettier with other ESLint configs like eslint-config-airbnb.
How to use it Either calling the function in your code or via prettier-eslint-cli if you prefer the command line. Add it to your .eslintrc. Add it to your .eslintrc.
Is the final output Prettier compliant? Depends on your ESLint config Yes Yes
Do you need to run prettier command separately? No No Yes
Do you need to use anything else? No You may want to turn off conflicting rules using eslint-config-prettier. No

For more information, refer to the official Prettier docs.

It's the recommended practice to let Prettier handle formatting and ESLint for non-formatting issues, prettier-eslint is not in the same direction as that practice, hence prettier-eslint is not recommended anymore. You can use eslint-plugin-prettier and eslint-config-prettier together.

2 of 2
3
  • Use eslint-config-prettier to turn-off eslint rules that are unnecessary or might conflict with Prettier. See 1st line in readme: eslint-config-prettier.
  • Use eslint-plugin-prettier to run Prettier as an Eslint-rule. See 1st line in readme: eslint-plugin-prettier
  • Use both to take advantage of both tools. See recommended configuration: eslint-plugin-prettier. This way you use plugin to run Prettier as an Eslint-rule, and config to turn-off eslint rules that are unnecessary or might conflict with Prettier.
  • You can ignore prettier-eslint
🌐
Medium
tianyaschool.medium.com › prettier-and-eslint-automating-code-style-and-quality-49cca1e2433c
Prettier and ESLint: Automating Code Style and Quality | by Kevin | Medium
May 9, 2025 - Offers extensive customizable rules to check code style, variable usage, code complexity, and more. Can be integrated with Prettier to format code first and then perform checks, avoiding format-related issues.
🌐
GitHub
github.com › prettier › prettier-eslint
GitHub - prettier/prettier-eslint: Code `prettier` `eslint --fix` Formatted Code :sparkles: · GitHub
If not provided, prettier-eslint will attempt to create the options based on the eslintConfig (whether that's provided or derived via filePath). You can also provide some of the options and have the remaining options derived via your eslint config. This is useful for options like parser. NOTE: these options override the eslint config. If you want the fallback options to be used only in the case that the rule ...
Author   prettier
🌐
Josh Finnie
joshfinnie.com › blog › adding-eslint-and-prettier-to-my-blog
Adding ESLint & Prettier to My Blog | www.joshfinnie.com
December 2, 2024 - Prettier is an opinionated code formatter that ensures consistent code style. It automatically enforces formatting rules like indentation, line breaks, and quote usage, eliminating the need for manual formatting.
🌐
Expo Documentation
docs.expo.dev › integrations › tools › using eslint and prettier
Using ESLint and Prettier - Expo Documentation
2 weeks ago - To integrate Prettier with ESlint, update your .eslintrc.js: ... module.exports = { extends: ['expo', 'prettier'], ignorePatterns: ['/dist/*'], plugins: ['prettier'], rules: { 'prettier/prettier': 'error', }, };
🌐
ANGULARarchitects
angulararchitects.io › home › blog › ng best practices: prettier & eslint
NG Best Practices: Prettier & ESLint - ANGULARarchitects
August 9, 2025 - Prettier is a code formatter that ensures consistent code formatting across all developers. ESLint is a code linter that enforces coding standards and best practices.
Top answer
1 of 2
3

For some rules you mentioned, namely indent or new lines, it doesn't matter, both ESlint and prettier lead to the same result. However max-len and printWidth work significantly different. max-len will just count the number of characters and throws an error if it's exceeded, but the error needs to be manually fixed.

According to the prettier docs, here is how the printWidth option works in contrast:

Prettier’s printWidth option does not work the same way. It is not the hard upper allowed line length limit. It is a way to say to Prettier roughly how long you’d like lines to be. Prettier will make both shorter and longer lines, but generally strive to meet the specified printWidth.

Additionally, prettier automatically fixes the line length of your lines. For example, see the following code:

function myVeryCoolFunctionWithLongName(myFirstFunctionArgument, mySecondFunctionArgument, myThirdFunctionArgument) {
}

With default prettier settings, it will be changed to:

function myVeryCoolFunctionWithLongName(
  myFirstFunctionArgument,
  mySecondFunctionArgument,
  myThirdFunctionArgument,
) {}

Whereas ESLint would just throw an error.

To summarize, while ESLint does a decent job in detecting formatting issues, prettier is much smarter in fixing your code to meet a consistent format. Read very closely again the sentence you cited:

ESLint isn't intended to perform code style fixes automatically

Further reference:

  • ESLint froze stylistic rules as of May 2020
  • TypeScript ESLint encourages using prettier for formatting
2 of 2
0

As prettier docs mentioned:

Linters have two categories of rules:

Formatting rules: eg: max-len, no-mixed-spaces-and-tabs, keyword-spacing, comma-style…

Prettier alleviates the need for this whole category of rules! Prettier is going to reprint the entire program from scratch in a consistent way, so it’s not possible for the programmer to make a mistake there anymore :)

Code-quality rules: eg no-unused-vars, no-extra-bind, no-implicit-globals, prefer-promise-reject-errors…

Prettier does nothing to help with those kind of rules. They are also the most important ones provided by linters as they are likely to catch real bugs with your code!

In other words, use Prettier for formatting and linters for catching bugs!

In fact, prettier will do it faster and more predictable because it is designed to do so. If you use ESLint for formatting, it would be like using a 5 pound hammer to drive a nail.

Use the right tool for the right job

I highly recommend you watch the video of Theo on this subject.

See more:

  • Josh Goldberg - Setting Up ESLint and TypeScript for React
  • Integrating with Linters