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.

Answer from Yangshun Tay on Stack Overflow
🌐
GitHub
github.com › prettier › eslint-plugin-prettier
GitHub - prettier/eslint-plugin-prettier: ESLint plugin for Prettier formatting · GitHub
Our recommended configuration automatically enables eslint-config-prettier to disable all formatting-related ESLint rules. For legacy configuration, this plugin ships with a plugin:prettier/recommended config that sets up both eslint-plugin-prettier and eslint-config-prettier in one go.
Author   prettier
🌐
npm
npmjs.com › search
eslint-plugin-prettier - npm search
``` "eslint": "^8.9", "eslint-config-prettier": "^8.3", "eslint-formatter-codeframe": "^7.32", "eslint-plugin-babel": "^5.3", "eslint-plugin-import": "^2.25", "eslint-plugin-jsx-a11y": "^6.5", "eslint-plugin-prettier": "^4.0", "eslint-plugin-react": "^7.2
🌐
Prettier
prettier.io › docs › integrating-with-linters
Integrating with Linters · Prettier
The downsides of those plugins are: You end up with a lot of red squiggly lines in your editor, which gets annoying. Prettier is supposed to make you forget about formatting – and not be in your face about it! They are slower than running Prettier directly. They’re yet one layer of indirection where things may break. Finally, we have tools that run prettier and then immediately lint files by running, for example, eslint --fix on them.
🌐
Josh Finnie
joshfinnie.com › blog › adding-eslint-and-prettier-to-my-blog
Adding ESLint & Prettier to My Blog | www.joshfinnie.com
December 2, 2024 - ESLint’s plugin architecture allows customization for any project. It works with frameworks like Astro and integrates with tools like Prettier. While Prettier handles formatting, ESLint focuses on code logic and structure.
🌐
Joshuakgoldberg
joshuakgoldberg.com › blog › you-probably-dont-need-eslint-config-prettier-or-eslint-plugin-prettier
You Probably Don't Need eslint-config-prettier or eslint-plugin-prettier | Goldblog
January 23, 2024 - Hence the plugin: prefix in front of them: that’s how ESLint knows where to find the configs. eslint-config-prettier is a shareable config that disables formatting-related rules.
🌐
Prettier
prettier.io › docs › install
Install · Prettier
It turns off all ESLint rules that are unnecessary or might conflict with Prettier.
Find elsewhere
🌐
GitHub
github.com › prettier › eslint-plugin-prettier › releases
Releases · prettier/eslint-plugin-prettier
ESLint plugin for Prettier formatting. Contribute to prettier/eslint-plugin-prettier development by creating an account on GitHub.
Author   prettier
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
medium.com › @contactmanoharbatra › eslint-and-prettier-configuration-f0259ebeb58b
Eslint and Prettier configuration | by Manohar Batra | Medium
September 10, 2025 - export default { env: { browser: true, es2021: true, }, extends: [ "eslint:recommended", "plugin:react/recommended", "plugin:react-hooks/recommended", "plugin:jsx-a11y/recommended", "plugin:import/recommended", "prettier", // if you also use Prettier ], parserOptions: { ecmaFeatures: { jsx: true, }, ecmaVersion: "latest", sourceType: "module", }, plugins: ["react", "react-hooks", "jsx-a11y", "import"], rules: { "react/react-in-jsx-scope": "off", // Not needed with React 17+ "react/prop-types": "off", // If using TypeScript or prefer no prop-types }, settings: { react: { version: "detect", }, }, }
🌐
ESLint
eslint.org › docs › latest › use › configure › configuration-files
Configuration Files - ESLint - Pluggable JavaScript Linter
For predefined configurations - When using ESLint’s built-in configurations like js/recommended or js/all. For modular configuration - When you want to compose multiple configuration sources into a single configuration object. For maintaining consistency - When you want to ensure consistent base rules across multiple configuration objects. For plugin integration - When you need to apply configurations that come bundled with plugins.
🌐
DEV Community
dev.to › viniciuskneves › prettier-eslint-and-typescript-491j
Prettier, ESLint and Typescript - DEV Community
September 20, 2021 - eslint-config-prettier: turns off rules that might conflict with Prettier. eslint-plugin-prettier: adds Prettier rules to ESLint.
🌐
Ben Ilegbodu
benmvp.com › blog › prettier-eslint
Prettier + ESLint = ❤️ | Ben Ilegbodu
January 31, 2021 - Instead of running prettier as a separate command, eslint-plugin-prettier runs Prettier as an ESLint rule, reporting anything incorrectly formatted as an ESLint error.
🌐
npm
npmjs.com › package › eslint-config-prettier
eslint-config-prettier - npm
July 18, 2025 - If you encounter a shared config that uses a non-standard plugin name, please ask them to use the standard name instead. Some of the rules that eslint-config-prettier turns off may be deprecated, or even removed from ESLint. This is perfectly fine, but if you really need to omit the deprecated and removed rules, you can do so by setting the ESLINT_CONFIG_PRETTIER_NO_DEPRECATED environment variable to a non-empty value.
      » npm install eslint-config-prettier
    
Published   Jul 18, 2025
Version   10.1.8
Author   Simon Lydell
🌐
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.
🌐
Robin Wieruch
robinwieruch.de › prettier-eslint
How to use Prettier with ESLint
Whereas Prettier is used to autoformat my code to enforce an opinionated code format, ESLint makes sure to keep my code style in a good shape. In this brief setup guide, I want to show you how to combine Prettier with ESLint without wasting any tear.
🌐
Next.js
nextjs.org › docs › app › api-reference › config › eslint
Configuration: ESLint | Next.js
2 weeks ago - We recommend including eslint-config-prettier in your ESLint config to make ESLint and Prettier work together.
🌐
Reddit
reddit.com › r/angular2 › how to include prettier into "new" flat eslint.js config?
r/Angular2 on Reddit: How to include prettier into "new" flat eslint.js config?
July 24, 2024 -

I created an angular project with NX 18 and that version unfortunately comes with flat eslint.js config which kind of makes my previous custom eslintrc.json configs obsolete.

(Since there is no eslint subreddit and I already asked on stackoverflow (https://stackoverflow.com/questions/79248446/converting-old-eslint-json-to-flat-eslint-js-for-custom-eslint-rules) I'm asking here now..)

It looks like this (with some custom eslint rules I added there, 4 extra rules for ts and 2 rules for html)

const nx = require('@nx/eslint-plugin');

module.exports = [
  ...nx.configs['flat/base'],
  ...nx.configs['flat/typescript'],
  ...nx.configs['flat/javascript'],
  {
    ignores: ['**/dist'],
  },
  {
    files: ['**/*.ts', '**/*.tsx', '**/*.js', '**/*.jsx'],
    // Override or add rules here
    rules: {},
  },
  ...nx.configs['flat/angular'],
  ...nx.configs['flat/angular-template'],
  {
    files: ['**/*.ts'],
    rules: {
      '@angular-eslint/directive-selector': [
        'error',
        {
          type: 'attribute',
          prefix: 'app',
          style: 'camelCase',
        },
      ],
      '@angular-eslint/component-selector': [
        'error',
        {
          type: 'element',
          prefix: 'app',
          style: 'kebab-case',
        },
      ],
      '@typescript-eslint/member-ordering': 'error',
      '@typescript-eslint/naming-convention': 'error',
      'default-case': 'error',
      'default-case-last': 'error',
    },
  },
  {
    files: ['**/*.html'],
    // Override or add rules here
    rules: {
      '@angular-eslint/template/attributes-order': ['error'], 
      '@angular-eslint/template/no-duplicate-attributes': ['error'],
    },
  },
];

How do I include prettier in there with the eslint-plugin-prettier library? (that apparently combines linter and formatter). I really can't find a solution anywhere! Like wtf, why enforce a new config out of nowhere when the doc is bad...

🌐
ESLint
eslint.org › docs › latest › use › getting-started
Getting Started with ESLint
Add configuration to the eslint.config.js file. Refer to the Configure ESLint documentation to learn how to add rules, custom configurations, plugins, and more.