Set up ESLint and Prettier together on a JavaScript or TypeScript project so they do not conflict over code formatting.
Check which ESLint rules in your project config conflict with Prettier using the included CLI tool.
Add ESLint and Prettier compatibility to a React, TypeScript, or Vue project in two steps.
Must be placed last in the ESLint extends array, otherwise other configs re-enable the formatting rules it disabled.
eslint-config-prettier is a small configuration package that makes two popular JavaScript development tools, ESLint and Prettier, work together without fighting each other. ESLint checks JavaScript code for errors and style issues. Prettier automatically reformats code to a consistent style. The problem is that ESLint has its own formatting rules, and when Prettier reformats code, ESLint can flag the result as a violation. This package solves that by simply turning off all the ESLint rules that deal with code formatting, leaving Prettier to handle those decisions on its own. The package does not add any new rules. Its entire job is to disable rules that conflict with Prettier. It covers both ESLint's built-in formatting rules and rules from several popular ESLint plugins for React, TypeScript, Vue, and other ecosystems. Once you add it to your ESLint configuration, you no longer get warnings about indentation, semicolons, quote styles, or other formatting concerns that Prettier manages. Setup takes two steps: install the package, then add "prettier" to the end of the "extends" list in your ESLint config file. Putting it last is important, because later entries override earlier ones, so this ensures the formatting rules it disables stay disabled even if other configs try to enable them. The package also ships with a command-line helper tool. You run it against one of your project's files, and it reports if any rules in your current ESLint configuration conflict with Prettier. This is useful for catching situations where a rule defined directly in the "rules" section of your config overrides what this package turned off. The README is thorough and covers both the older eslintrc configuration format and the newer flat config format that ESLint introduced more recently, including known caveats around plugin naming in flat config mode.
← prettier on gitmyhub — every repo by this author, as a profile.
Verify against the repo before relying on details.