Ah okay so the answer here was to implement the right Prettier rules in .prettierrc.

The VSCode Prettier settings can be set specifically for the workspace, which was what caused me confusion (I had trailingComma set to none in another workspace which made me confused about why that workspace was correctly formatting things).

I added this code to .prettierrc, which makes the Prettier formatter consistent with the ESLint rules:

{
  "arrowParens": "avoid",
  "trailingComma": "none",
  "tabWidth": 2,
  "semi": true,
  "singleQuote": false
}

I (mistakenly?) thought that Prettier automatically derived its formatting options from the ESLint rules.

Answer from Jeff Demanche on Stack Overflow
🌐
Reddit
reddit.com › r/typescript › i want vscode to show prettier errors on warnings but i don't want eslint to fix them
r/typescript on Reddit: I want vscode to show prettier errors on warnings but I don't want eslint to fix them
April 27, 2025 -

I am maintaining a very old ts project wherein I am setting up prettier and linter. Long story short, prettier flagged 2500 files. So, we decided not to run prettier --write in order to preserve history.

We have also setup eslint, for implementing other rules within the codebase including identifying import order issues. Now 2 situations:

  1. If I turn off the plugin, prettier errors stop showing on the IDE (vscode)

  2. If I turn it to either 'warn' or 'error', it shows up in vscode as an issue but it gets auto corrected by eslint --fix or when I save after setting the flag in .vscode/settings.json

Is there a middle ground where the errors will show in vscode but will not get overwritten by eslint --fix or during save?

Discussions

Version 8.0.0 errors with "Extension 'Prettier - Code Formatter' cannot format" on all documents
Any time I attempt to format a JSON document in 8.0.0 I get the error: Extension 'Prettier - Code Formatter' cannot format ' .json' I see no log files to assist with ... More on github.com
🌐 github.com
29
February 27, 2021
Prettier does not format documents in latest Prettier + VS code versions
Summary Prettier does not format code, error and logs shown below. Using: Ubuntu: 22.04.2 in Windows + WSL 2 VS Code: 1.80.0 Prettier: 9.19.0 Github Repository to Reproduce Issue Installed the late... More on github.com
🌐 github.com
25
May 25, 2023
prettier 3.0 and prettier-vscode v10.1.0 won't load plugins
Summary In my project, VS Code successfully loads my Prettier config, but when I try and format a tsx file it logs an error. Visual Studio Code is on version 1.80.2. My config is as follows, and is exported as a package in a monorepo and... More on github.com
🌐 github.com
37
August 1, 2023
Why does Prettier not format code in VS Code?
I've double-checked each step and still am not seeing Prettier issues in the problems vscode tab 2024-05-12T14:35:01.75Z+00:00 ... @vsync this setup was mostly for some NuxtJS v2 config so it depends on the rules you have for your linter. But try to make an obvious mistake and it should work. Otherwise I guess the VScode team changed something lately, check maybe some error ... More on stackoverflow.com
🌐 stackoverflow.com
🌐
DEV Community
dev.to › bonnie › eslint-prettier-and-vscode-troubleshooting-ljh
ESLint, Prettier and VSCode Troubleshooting - DEV Community
June 3, 2022 - I strongly prefer to use eslint-plugin-prettier and configure Prettier within my ESLint configuration file (rather than maintain two configuration files). Make sure the default formatter in VSCode Settings is set to ESLint.
🌐
Gleb Bahmutov
glebbahmutov.com › blog › configure-prettier-in-vscode
How to configure Prettier and VSCode | Better world by better software
April 23, 2024 - JavaScript files should now show ESLint errors right inside VSCode editor. You can see these errors for yourself by opening projectC/index.js in VSCode from the example repo. Since ESLint can detect and fix many of the errors it detects automatically, let's tell ESLint to run Prettier too.
🌐
GitHub
github.com › prettier › prettier-vscode › issues › 2029
Version 8.0.0 errors with "Extension 'Prettier - Code Formatter' cannot format" on all documents · Issue #2029 · prettier/prettier-vscode
February 27, 2021 - Any time I attempt to format a JSON document in 8.0.0 I get the error: Extension 'Prettier - Code Formatter' cannot format ' .json' I see no log files to assist with ...
Author   kevin-lindsay-1
🌐
GitHub
github.com › prettier › prettier-vscode › issues › 3071
Prettier does not format documents in latest Prettier + VS code versions · Issue #3071 · prettier/prettier-vscode
May 25, 2023 - Summary Prettier does not format code, error and logs shown below. Using: Ubuntu: 22.04.2 in Windows + WSL 2 VS Code: 1.80.0 Prettier: 9.19.0 Github Repository to Reproduce Issue Installed the latest prettier vs-code extension. Steps To ...
Author   OmerMessing
🌐
GitHub
github.com › prettier › prettier-vscode › issues › 3104
prettier 3.0 and prettier-vscode v10.1.0 won't load plugins · Issue #3104 · prettier/prettier-vscode
August 1, 2023 - ["ERROR" - 18:34:42] Error handling text editor change ["ERROR" - 18:34:42] Error resolve node module 'prettier-plugin-organize-imports' Error: Error resolve node module 'prettier-plugin-organize-imports' at n (/Users/lewisflude/.vscode/extensions/esbenp.prettier-vscode-10.1.0/dist/extension.js:1:2718) at /Users/lewisflude/.vscode/extensions/esbenp.prettier-vscode-10.1.0/dist/extension.js:1:3068 at Array.map (<anonymous>) at t.resolveConfigPlugins (/Users/lewisflude/.vscode/extensions/esbenp.prettier-vscode-10.1.0/dist/extension.js:1:3003) at t.ModuleResolver.resolveConfig (/Users/lewisflude/.
Author   lewisflude
Find elsewhere
🌐
DeveloperF1
developerf1.com › snippet › prettier-stopped-working-in-vs-code
Fix: Prettier stopped working in VS Code - DeveloperF1.com
September 5, 2023 - If there is a warning sign then click on the Prettier text and it will open the Output panel, where you can see the error message. Maybe your Prettier config file was corrupted. Open settings by pressing CTRL + , or using the menu item File ...
🌐
SheCodes
shecodes.io › athena › 104-how-to-fix-prettier-not-working-in-vs-code
[VS Code] - How to Fix Prettier Not Working in VS Code - | SheCodes
Discover how to fix the Prettier's non-working issue on VS Code. Step-by-step guide with detailed technical help is available.
Top answer
1 of 4
5

Update:

Since writing the below, I discovered that it may be more economical to keep ESLint on with the following in settings.json:

{
  // ...
  "eslint.enable": true,
  "eslint.run": "onSave",
  "editor.defaultFormatter": "esbenp.prettier-vscode",
  "editor.formatOnSave": true,
  "files.autoSave": "off",
  // ...
}
  • Enable ESLint and only run it on save.
    • This avoids ESLint from reporting errors everywhere when you're writing code.
  • Enable Prettier and have it format on save.
    • ESLint will only check the file after Prettier has formatted it.
  • Disable auto-saving features in VS Code.
    • I choose to manually save because I can save it when I think the code doesn't have any syntax errors, which ensures that Prettier can format the file on save.
    • VS Code automatically saves your edit session to disk, so even if you quit with unsaved changes or if something untoward happens, you'll restore session with the same unsaved changes next time. So auto-saving of files is not really necessary.

Note that if your entire project is not already formatted with Prettier, I suggest doing so using npx prettier --write ..

Original answer:

Quick Fix: Disable the ESLint extension in VSCode.

Explanation: These errors are generated by a lint tool, most likely ESLint.

It happens when you install both the eslint package as well as the "ESLint" extension in VS Code. The package checks to make sure the code is formatted well and throws errors if it's not. The extension runs the package seamlessly and dresses your VS Code window with those errors (hence the red squiggly lines). Good news is, you can have eslint package installed in your project without the extension. Prettier can still auto-format your code using the package without the extension.

Answer: If you have installed the ESLint extension, you can simply disable it, either by using the "eslint.enable": false or by finding ESLint in the Extensions sidebar and disabling it.

This Stack Overflow question has many answers which guide you on the matter.

Note: Prettier is not a lint tool. It's a formatter.

Bonus Tip: Run npx prettier --write . in your project to format all files according to your Prettier rules.

2 of 4
2

Another option is to disable to rule globaly in the ESlint plugin settings (in settings.json):

# other settings
"eslint.rules.customizations": [
  {
    "rule": "prettier/prettier",
    "severity": "off",
  }
]

You can open settings.json file like this:

  • Code -> Settings (or ⌘,/ctrl,)
  • Click the "document icon" in the top right corner Open Settings (JSON)
🌐
Bobby Hadz
bobbyhadz.com › blog › fix-prettier-not-working-in-vs-code
How to fix Prettier Extension not working in VS Code | bobbyhadz
If there are any issues with your Prettier installation or configuration, they are shown in the OUTPUT tab.
🌐
GitHub
github.com › prettier › prettier-vscode › issues › 1156
Prettier Extension Not working in VS Code · Issue #1156 · prettier/prettier-vscode
December 20, 2019 - Running the contributed command: 'prettier.openOutput' failed. I am getting this error on VS code.
Author   ndev011
🌐
GitHub
github.com › prettier › prettier-vscode › issues › 3382
I have done all kinds of things but my prettier does not format on save. · Issue #3382 · prettier/prettier-vscode
April 26, 2024 - Type: Bug I installed prettier, on user I checked format on save and checked the config. Well it does not format on save I have followed all kinds of videos but it doesnot work. I think I did something wrong with the path. I even tried t...
Author   Tochiskool
🌐
39digits
39digits.com › configure-prettier-and-eslint-in-visual-studio-code
Configure Prettier and ESLint in Visual Studio Code | 39digits
There is a Prettier plugin for ESLint. This plugin leverages ESLint to show formatting errors as you type and can allow ESLint to auto-fix these. We've set Prettier to run on each file save so we would only benefit from the added visual cues in our editor.
🌐
Medium
salifyataala.medium.com › how-to-solve-eslint-prettier-errors-when-using-vue-and-typescript-in-visual-studio-code-f910f65b7bff
How to solve EsLint/Prettier Errors when using Vue and Typescript In Visual Studio Code | by Salifyanji Taala | Medium
December 5, 2020 - How to solve EsLint/Prettier Errors when using Vue and Typescript In Visual Studio Code Hello coders In this post am going to share with you an experience I had with eslint and prettier errors. Some …
🌐
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 - { "editor.formatOnSave": true, "editor.defaultFormatter": "esbenp.prettier-vscode" } Symptoms: Prettier works alone, but stops formatting when ESLint is enabled. ESLint shows formatting errors that Prettier doesn’t fix. Format on save stops working after ESLint is installed.
🌐
Microsoft Learn
learn.microsoft.com › en-us › answers › questions › 5779539 › prettier-extension-not-working-in-visual-studio-co
prettier extension not working in Visual Studio Code - Microsoft Q&A
4 weeks ago - Disable other formatting extensions to see if that resolves the issue. Check for Errors: Open the Output panel (View > Output) and select "Prettier" from the dropdown to see if there are any error messages that can provide insight into the problem.