🌐
GitHub
github.com › prettier › prettier-eslint-cli
GitHub - prettier/prettier-eslint-cli: CLI for prettier-eslint · GitHub
You have a bunch of files that you want to format using prettier-eslint. But prettier-eslint can only operate on strings. This is a CLI that allows you to use prettier-eslint on one or multiple files.
Starred by 548 users
Forked by 69 users
Languages   JavaScript
🌐
npm
npmjs.com › package › prettier-eslint-cli › v › 1.0.1
prettier-eslint-cli - npm
CLI for prettier-eslint. Latest version: 8.0.1, last published: 2 years ago. Start using prettier-eslint-cli in your project by running `npm i prettier-eslint-cli`. There are 165 other projects in the npm registry using prettier-eslint-cli.
      » npm install prettier-eslint-cli
    
Published   Oct 14, 2023
Version   1.0.1
Author   Kent C. Dodds
🌐
Prettier
prettier.io › docs › install
Install · Prettier
Use eslint-config-prettier to make Prettier and ESLint play nice together.
🌐
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.
Starred by 5.9K users
Forked by 262 users
Languages   JavaScript
🌐
Prettier
prettier.io › docs › integrating-with-linters
Integrating with Linters · Prettier
Finally, we have tools that run prettier and then immediately lint files by running, for example, eslint --fix on them.
🌐
GitHub
github.com › prettier › prettier-eslint
GitHub - prettier/prettier-eslint: Code `prettier` `eslint --fix` Formatted Code :sparkles: · GitHub
The config to use for formatting with ESLint. Can be overridden with filePath. The options to pass for formatting with prettier. If not provided, prettier-eslint will attempt to create the options based on the eslintConfig (whether that's provided or derived via filePath).
Starred by 4.1K users
Forked by 175 users
Languages   TypeScript 92.9% | JavaScript 7.1%
🌐
Expo Documentation
docs.expo.dev › integrations › tools › using eslint and prettier
Using ESLint and Prettier - Expo Documentation
2 weeks ago - ESLint is a JavaScript linter that helps you find and fix errors in your code. It's a great tool to help you write better code and catch mistakes before they make it to production.
🌐
SourceForge
sourceforge.net › projects › prettier-eslint-cli.mirror
prettier-eslint-cli download | SourceForge.net
Download prettier-eslint-cli for free. CLI for prettier-eslint. You have a bunch of files that you want to format using prettier-eslint. But prettier-eslint can only operate on strings.
🌐
UNPKG
unpkg.com › browse › prettier-eslint-cli@5.0.1 › README.md
prettier-eslint-cli/README.md
CLI for prettier-eslint · github.com/prettier/prettier-eslint-cli · prettier/prettier-eslint-cli · 337 lines (261 loc) • 23.3 kB · Markdown · View Raw · 1 · 2 · 3 · 4 · 5 · 6 · 7 · 8 · 9 · 10 · 11 · 12 · 13 · 14 · 15 · 16 · 17 · 18 ·
Find elsewhere
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
🌐
npm
npmjs.com › package › eslint-plugin-prettier
eslint-plugin-prettier - npm
Runs prettier as an eslint rule. Latest version: 5.5.5, last published: 2 months ago. Start using eslint-plugin-prettier in your project by running `npm i eslint-plugin-prettier`. There are 8712 other projects in the npm registry using ...
      » npm install eslint-plugin-prettier
    
Published   Jan 14, 2026
Version   5.5.5
Author   Teddy Katz
🌐
GitHub
github.com › prettier › eslint-plugin-prettier
GitHub - prettier/eslint-plugin-prettier: ESLint plugin for Prettier formatting · GitHub
ESLint plugin for Prettier formatting. Contribute to prettier/eslint-plugin-prettier development by creating an account on GitHub.
Starred by 3.6K users
Forked by 212 users
Languages   JavaScript
🌐
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
🌐
npm
npmjs.com › package › prettier-eslint
prettier-eslint - npm
Formats your JavaScript using prettier followed by eslint --fix. Latest version: 16.4.2, last published: 10 months ago. Start using prettier-eslint in your project by running `npm i prettier-eslint`. There are 340 other projects in the npm registry using prettier-eslint.
      » npm install prettier-eslint
    
Published   May 07, 2025
Version   16.4.2
Author   Kent C. Dodds
🌐
GitHub
github.com › heavenshell › vim-prettier
GitHub - heavenshell/vim-prettier: Prettier-Eslint-Cli for Vim
Prettier-Eslint-Cli for Vim. Contribute to heavenshell/vim-prettier development by creating an account on GitHub.
Author   heavenshell
Top answer
1 of 2
10

VSCode doesn't support chaining multiple formatters. More at this related question.

But chaining formatters isn't the answer to your problem. If you're using Prettier and ESLint properly then they do not overlap in their ruleset. You can use eslint-plugin-prettier to format the document with only ESLint and it will run Prettier as an ESLint rule. Adding eslint-config-prettier disables any ESLint rules that would conflict with Prettier.

Afterwards, running eslint --fix would apply both your ESLint and Prettier rules in a single format.

If you would like to use ESLint with other filetypes then you need to find ESLint plugins that work for those filetypes. They require installation and configuration unique to each plugin. An example is eslint-plugin-jsonc to add support for JSONC.

In package.json:

{
  "devDependencies": {
    "@typescript-eslint/eslint-plugin": "^6.10.0",
    "@typescript-eslint/parser": "^6.10.0",
    "eslint": "^8.53.0",
    "eslint-config-prettier": "^9.0.0",
    "eslint-plugin-prettier": "^5.0.1",
    "prettier": "^3.0.3",
    "typescript": "^5.2.2"
  }
}

In .eslintrc.json:

{
  "extends": [
    "plugin:prettier/recommended" // must be last element in "extends"
  ],
  "parser": "@typescript-eslint/parser",
  "plugins": [
    "@typescript-eslint"
  ],
  "settings": {
    "import/parsers": {
      "@typescript-eslint/parser": [
        ".ts"
      ]
    },
  }
}

Set your Prettier rules in .prettierrc.json, for example:

{
  "printWidth": 100
}

Now eslint --fix will format the document in a single pass.

For VSCode, install both the dbaeumer.vscode-eslint and the esbenp.prettier-vscode extensions. These each require you to have the corresponding npm package installed, whether locally in your app or globally on your device. You may also need to configure VSCode so that it can find the packages, depending on how they were installed.

Then when you run Format Document With and select ESLint it will apply both your ESLint and Prettier rules with the equivalent of eslint --fix. For example, leaving a trailing space will trigger this INFO alert:

Delete `·` eslint (prettier/prettier)

Formatting the document with ESLint resolves the issue.

2 of 2
1

This bugged me ALOT as well. There are a lot of resources online about different ways. The problem is most of them are outdated, don't work, require some config adjustments, and have their own set of trade-offs.

Here was the solution I ended up going with:

I just added this to my users keybindings.json:

{
    "key": "cmd+alt+f",
    "command": "workbench.action.terminal.sendSequence",
    "args": {
        "text": "npx prettier --write '${file}' > /dev/null 2>&1 && npx eslint_d --fix '${file}' > /dev/null 2>&1 & \u000D" // The CLI command to run "\u000D" is just the return key.
    },
    "when": "editorTextFocus"
},

That command uses eslint_d but thats just a performance enhancement. You could just as easily use eslint instead.

If you want to get it to run on save. You can try vscode-run-on-save

The benefit of this was it just works across any flavor of vscode like cursor, windsurf, etc. I don't have to muck with configs or any other setup.

Hope this helps someone else :).

🌐
LogRocket
blog.logrocket.com › home › using prettier and eslint for javascript formatting
Using Prettier and ESLint for JavaScript formatting - LogRocket Blog
October 22, 2024 - While a big reason to use Prettier is to avoid configuration altogether, Prettier does support a configuration file that has a handful of formatting options. ESLint is a JavaScript linting utility that was first released in June 2013 and is now by far the number one linting utility.
🌐
Robin Wieruch
robinwieruch.de › prettier-eslint
How to use Prettier with ESLint
The default setup for my JavaScript projects: Prettier + 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.
🌐
GitHub
github.com › prettier › prettier-eslint-cli › issues › 454
Support eslint@9, or am I missing something? · Issue #454 · prettier/prettier-eslint-cli
October 11, 2024 - I've upgraded to eslint@v9 with all of my plugins and I get this: prettier-eslint [ERROR]: There was trouble creating the ESLint CLIEngine. prettier-eslint-cli [ERROR]: There was an error forma...
Author   phun-ky