+0
Daily
5,899
stars
259
forks
27
watchers
171
prs
203
issues
11
releases
README
eslint-config-prettier
Turns off all rules that are unnecessary or might conflict with [Prettier].
This lets you use your favorite shareable config without letting its stylistic choices get in the way when using Prettier.
Note that this config _only_ turns rules _off,_ so it only makes sense using it together with some other config.
[prettier]: https://github.com/prettier/prettier
Installation
1. Install eslint-config-prettier:
shell
npm i -D eslint-config-prettier
shell
yarn add -D eslint-config-prettier
shell
pnpm add -D eslint-config-prettier
shell
bun add -D eslint-config-prettier
2. Add eslint-config-prettier to your ESLint configuration – either to [eslintrc] or to [eslint.config.js (flat config)].
- eslintrc: Add "prettier" to the "extends" array in your .eslintrc. file. Make sure to put it last, so it gets the chance to override other configs.
json
{
"extends": [
"some-other-config-you-use",
"prettier"
]
}
- eslint.config.js (flat config): Import eslint-config-prettier, and put it in the configuration array – after other configs that you want to override.
js
import someConfig from "some-other-config-you-use";
// Note the /flat suffix here, the difference from default entry is that
// /flat added name property to the exported object to improve
// config-inspector experience.
import eslintConfigPrettier from "eslint-config-prettier/flat";
export default [
someConfig,
eslintConfigPrettier,
];
3. Finally, run the CLI helper tool to find problems in the "rules" sections of your config.
👉 Using [eslint-plugin-prettier]? Check out [eslint-plugin-prettier’s recommended config][eslint-plugin-prettier-recommended].
Plugins
eslint-config-prettier not only turns off _core_ rules, but also some from these plugins automatically:
- [@babel/eslint-plugin]
- [@stylistic/eslint-plugin]
- [@typescript-eslint/eslint-plugin]
- [eslint-plugin-babel]
- [eslint-plugin-flowtype]
- [eslint-plugin-react]
- [eslint-plugin-standard]
- [eslint-plugin-unicorn]
- [eslint-plugin-vue]
ℹ️ Note: You might find guides on the Internet saying you should also extend stuff like "prettier/react". Since version 8.0.0 of eslint-config-prettier, all you need to extend is "prettier"! That includes all plugins.
eslint.config.js (flat config) plugin caveat
With flat config, _you_ get to decide the plugin name! For example:
js
import typescriptEslint from "@typescript-eslint/eslint-plugin";
import eslintConfigPrettier from "eslint-config-prettier/flat";
export default [
{
plugins: {
// You’d typically use one of the following two:
// typescriptEslint: typescriptEslint,
// typescriptEslint,
// But in this example we give it another name.
// It might be tempting to use something shorter like “ts”:
ts: typescriptEslint, // 🚨 Don’t do this!
},
Top issues
#34910.1.8: Patch version should be bumped5 comments · 2025-09-30#287Conflict with import/newline-after-import5 comments · 2024-05-02#276Docs: Clarifying when this config is useful as a config?3 comments · 2023-12-22#292add support for `@vitest/eslint-plugin`2 comments · 2024-09-27#248Support `@html-eslint`1 comments · 2023-04-04#367Test failure on Windows 11: eslint-find-rules crashes due to removed wmic ([email protected])0 comments · 2026-06-10#365Remove "vue/html-end-tags": "off"0 comments · 2026-03-23#364Add ft-flow to disabled rules0 comments · 2026-03-04
Latest release
v10.1.8 v10.1.8 2025-07-18republish latest version Full Changelog: https://github.com/prettier/eslint-config-prettier/compare/v10.1.5...v10.1.8