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.

Answer from anothermh on Stack Overflow
🌐
DigitalOcean
digitalocean.com › community › tutorials › how-to-format-code-with-prettier-in-visual-studio-code
Format Code with Prettier in Visual Studio Code: Setup Guide | DigitalOcean
August 1, 2025 - This tells VS Code to run the formatter every time you save a file. Make sure Prettier is set as the default formatter (see next question). To make sure Visual Studio Code uses Prettier for all formatting operations: Open Settings (JSON) via the Command Palette. ... You can apply this setting globally or in a workspace-specific .vscode/settings.json file.
🌐
Visual Studio Marketplace
marketplace.visualstudio.com › items
Prettier - Code formatter - Visual Studio Marketplace
January 21, 2026 - Extension for Visual Studio Code - Code formatter using prettier
Discussions

visual studio code - In VSCode, how do I effectively run eslint --fix and prettier --write on "Format Document"? - Stack Overflow
For VSCode, install both 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 ... More on stackoverflow.com
🌐 stackoverflow.com
visual studio code - Installing Prettier on VSCode - Stack Overflow
I would like to use Prettier to format my code 'on save' but I am struggling to set it up. Here are the steps I've taken: installed Prettier globally as node package using npm install -g prettier. More on stackoverflow.com
🌐 stackoverflow.com
Prettier takes a long time to save
UPDATE: I solved it by disabling some 3rd party VSCode extensions. Can't tell which one was the culprit though. More on reddit.com
🌐 r/vscode
2
0
July 4, 2022
How to make "Prettier" the default formatter in VS Code? - Stack Overflow
I've installed Prettier extension in VS Code, and when I attempt to format a file, VS Code asked me: Do you want to format with the default formatter or with prettier formatter? I accidentally ch... More on stackoverflow.com
🌐 stackoverflow.com
🌐
freeCodeCamp
freecodecamp.org › news › how-to-use-prettier-in-visual-studio-code
How To Use Prettier in Visual Studio Code
March 18, 2024 - In this guide, you will learn how to install Prettier in Visual Studio Code and how to use it to format code.
🌐
Prettier
prettier.io › docs › editors
Editor Integration · Prettier
If your editor does not support Prettier, you can instead run Prettier with a file watcher. Note! It’s important to install Prettier locally in every project, so each project gets the correct Prettier version. prettier-vscode can be installed using the extension sidebar – it’s called ...
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 :).

🌐
Scott Sauber
scottsauber.com › 2017 › 06 › 10 › prettier-format-on-save-never-worry-about-formatting-javascript-again
Prettier + Format On Save = Never worry about formatting JavaScript again – Scott Sauber
June 12, 2021 - I find when using Prettier, along with the Format On Save option in VS Code, I don’t think about how to format my code anymore. I don’t ever wonder “oh should I put this on multiple lines or keep it all in one line?” Instead, I focus on solving my problem, hit Save and let Prettier do the rest.
Find elsewhere
🌐
Medium
medium.com › towardsdev › quick-guide-setup-prettier-in-vscode-with-node-js-8bb3f3b41fc0
Quick Guide ⚡: Setup Prettier in VSCode with Node.js 👌👨‍💻🚀
March 5, 2025 - 2- Install the Prettier extension in VSCode. Open VSCode, go to the extensions tab (Ctrl+Shift+X or Cmd+Shift+X), search for “Prettier” and click “Install”.
🌐
DEV Community
dev.to › receter › how-to-install-prettier-in-your-codebase-and-vscode-4c19
How to Install Prettier in Your Codebase and VSCode - DEV Community
August 14, 2024 - Now run this command in the root folder of your project to format all files: ... ℹ️ using npx here ensures that the locally installed version of Prettier is executed. This is important if you also have prettier installed globally. Now all your project files should be nicely formated. 🧹✨ · Next you can setup a Prettier plugin for your IDE. I use Visual Studio Code, but there are also plugins for many other editors. For VSCode, install this extension: esbenp.prettier-vscode
🌐
Reddit
reddit.com › r/vscode › prettier takes a long time to save
r/vscode on Reddit: Prettier takes a long time to save
July 4, 2022 -

I use vscode with pretter plugin on a react/javascript project.

It used to be instantaneous reformatting on save. Since a few weeks now, it takes several seconds to save a file, with the Prettier pop-up showing up in the meantime.

Anyone in a similar situation?

🌐
YouTube
youtube.com › zach gollwitzer
Are you using Prettier? (how to set up in VSCode to format on save) - YouTube
AboutPressCopyrightContact usCreatorsAdvertiseDevelopersTermsPrivacyPolicy & SafetyHow YouTube worksTest new featuresNFL Sunday Ticket · © 2024 Google LLC
Published   December 11, 2022
Views   109K
🌐
SheCodes
shecodes.io › athena › 9830-how-to-use-prettier-in-vs-code
[VS Code] - How to Use Prettier in VS Code - SheCodes | SheCodes
Learn how to use Prettier in Visual Studio Code by checking the extention installation, enabling and configuring it. Follow these steps to get your set up!
🌐
YouTube
youtube.com › watch
How to use Prettier in VS Code - Code Formatting - YouTube
In this video I will show you how to install and configure Prettier Code Formatter in VS Code. Formatting code consistently can be a challenge. Code formatt...
Published   October 8, 2023
🌐
Prettier
prettier.io › docs › install
Install · Prettier
Add a .prettierignore to let your editor know which files not to touch, as well as for being able to run prettier --write . to format the entire project (without mangling files you don’t want, or choking on generated files). Run prettier --check .
🌐
YouTube
youtube.com › watch
How to Use Prettier with VS Code! (2026 Full Tutorial) - YouTube
Are you tired of messy, inconsistent code? Let's fix that with Prettier and VS Code!Prettier is an opinionated code formatter helps keep your code styling co...
Published   August 24, 2024
🌐
Visual Studio Code
code.visualstudio.com › docs › python › formatting
Formatting Python in VS Code
November 3, 2021 - Missed Agent Sessions Day? Watch on-demand now · Formatting makes source code easier to read by human beings. By enforcing particular rules and conventions such as line spacing, indents, and spacing around operators, the code becomes more visually organized and comprehensible.
🌐
Khalil Stemmler
khalilstemmler.com › blogs › tooling › prettier
How to use Prettier with ESLint and TypeScript in VSCode | Khalil Stemmler
January 21, 2022 - In this guide, we'll explain how to use Prettier with ESLint, delegating the responsibility of code convention definition to ESLint, and the responsibility of formatting to Prettier.