talira

eslint-config-prettier

Turns off ESLint rules that conflict with Prettier

open sourceMITfree

eslint-config-prettier is a shareable ESLint config that turns off every rule that is unnecessary or might conflict with Prettier, so you can keep your favourite ESLint config without its stylistic rules fighting Prettier's formatting. It works with both eslintrc and flat config (eslint.config.js), and its CLI helper checks a config for rules that it would turn off.

Problems it solves

  • ESLint and Prettier keep fighting over formatting in my JavaScript project
  • stop ESLint reporting style errors that Prettier already fixes
  • use Prettier together with the Airbnb or another ESLint style config

Features

  • turns off ESLint rules that conflict with Prettier
  • works with eslintrc and flat config
  • CLI to find conflicting rules in your config

Limitations

  • It only turns rules off, so it needs another ESLint config beside it, and it must come last so it can override the others.1

Alternatives

The same job

These do what eslint-config-prettier does.

  1. eslint-plugin-prettier Run Prettier as an ESLint rule
  2. Biome One fast toolchain that formats and lints JavaScript, TypeScript, JSON, CSS, HTML, GraphQL, YAML and Markdown.
  3. typescript-eslint The tooling that lets ESLint and Prettier lint and read TypeScript
  4. Oxc The JavaScript Oxidation Compiler: high-performance JavaScript and TypeScript tools in Rust
  5. ESLint Find and fix problems in your JavaScript code.
  6. Stylelint A CSS linter that catches errors and enforces conventions in your stylesheets

Compare eslint-config-prettier with the top 3