Only advice I can give is stop using Prettier. Trying to make it work with ESlint and Vetur was always pain. Then I found this question (and self answer) here on SO which recommends dropping Prettier and using ESlint not just for linting but also for formatting (needs version >= 6). I'm happy as clam now...

Answer from Michal Šindelář on Stack Overflow
🌐
GitHub
github.com › prettier › prettier-vscode › issues › 2729
.vue files cannot be formatted · Issue #2729 · prettier/prettier-vscode
September 27, 2022 - Summary Version 9.9.0, vue files cannot be formatted when a configuration file exists in the project directory Prettier - Code formatter 9.9.0 Vue Language Features (Volar) 0.40.13 Actual result
Author   DimplesY
Discussions

Why does Prettier not format code in VS Code?
This is not a problem with Prettier itself, but prettier-vscode, the VSCode extension. According to its documentation, Vue formatting is disabled by default: More on stackoverflow.com
🌐 stackoverflow.com
can't format for vue
Here is config Run normally in version 1.23. In the 1.27.2 version, you cannot format code for Vue files normally. hope help thx More on github.com
🌐 github.com
12
September 30, 2018
.vue file can not format when set `prettier.eslintIntegration` in vscode setting config
I use both prettier and eslint in vscode. When I set prettier.eslintIntergration: true in vscode setting config, prettier can not format .vue file. More on github.com
🌐 github.com
12
July 14, 2018
HELP : Prettier and vue template are not working well
Try going through this: https://vueschool.io/articles/vuejs-tutorials/eslint-and-prettier-with-vite-and-vue-js-3/ More on reddit.com
🌐 r/vuejs
1
1
December 24, 2023
🌐
GitHub
github.com › vuejs › language-tools › issues › 3605
VSCode extension prevents `prettier-vscode` from formatting `.vue` files on save · Issue #3605 · vuejs/language-tools
September 28, 2023 - When I save a .vue file, no formatting happens and I get the following notification: Extension 'Prettier - Code formatter' is configured as formatter but it cannot format 'vue'-files · I see no obvious messages on VSCode output for either extension. Oddly enough, if I manually run the "Format document" action (or "Format document with..." and select Prettier), it works as expected.
Author   rafasoares
🌐
GitHub
github.com › prettier › prettier-vscode › issues › 590
can't format for vue · Issue #590 · prettier/prettier-vscode
September 30, 2018 - Here is config Run normally in version 1.23. In the 1.27.2 version, you cannot format code for Vue files normally. hope help thx
Author   jiang-xiche
🌐
Medium
mattgosden.medium.com › quick-vscode-setup-for-vue-js-with-prettier-and-eslint-4b97fc71c587
Quick VSCode setup for Vue.js with Prettier and ESLint | by Matt Gosden | Medium
March 31, 2020 - Prettier formats the JS code in a nice opinionated way. However this is not fully aligned with ESLint and therefore the build fails due to ESLint errors. There are a number of good tutorials on this for example here, but these do not work out of the box and need some tweaks for Quasar / Vue.js ... … and any other useful plugin. These could include (Bracket Pair Colorizer, Sass, Vue VSCode ...
🌐
GitHub
github.com › prettier › prettier-vscode › issues › 498
.vue file can not format when set `prettier.eslintIntegration` in vscode setting config · Issue #498 · prettier/prettier-vscode
July 14, 2018 - I use both prettier and eslint in vscode. When I set prettier.eslintIntergration: true in vscode setting config, prettier can not format .vue file.
Published   Jun 15, 2018
Find elsewhere
🌐
Reddit
reddit.com › r/vuejs › help : prettier and vue template are not working well
r/vuejs on Reddit: HELP : Prettier and vue template are not working well
December 24, 2023 -

Hello,

Since I've started my vue project and wanted to do things properly (formatting and linting).

Prettier has been giving me headaches, I fixed many problem and learned at lot in the process but there are still some things that drive me crazy like "infinite lines" in html classes etc ..

How do you format you vue files ?

here is my vscode settings

"[vue]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
},

Thank you

🌐
w3tutorials
w3tutorials.net › blog › why-does-prettier-not-format-code-in-vs-code
Why Prettier Isn't Formatting Code in VS Code? Fix for Nuxt Apps with ESLint & .vue Files — w3tutorials.net
Delete .vscode/settings.json and reapply settings globally if needed. Prettier not formatting in Nuxt apps is almost always due to misconfigured VS Code settings, conflicting ESLint rules, or outdated dependencies.
🌐
GitHub
github.com › vuejs › vetur › issues › 1076
prettier can format vue, but I can not use it for Vue templates · Issue #1076 · vuejs/vetur
January 31, 2019 - But vetur uses prettyHtml for Vue templates and I can't change it to vue, .i.e I can not set "vetur.format.defaultFormatter.html": "prettier", So now when I save vue codes, vscode will format my code using prettyHtml, then our lint process will use prettier to format codes again.
Author   qiulang
🌐
GitHub
github.com › prettier › prettier-vscode › issues › 338
Vetur html format does not work with prettier-vscode > 1.0.1 · Issue #338 · prettier/prettier-vscode
January 18, 2018 - All versions past 1.0.1 will not work with Vetur when setting Vetur to format html with js-beautify-html. Installing version 1.0.1 of prettier-vscode fixes this issue. Not sure if its a prettier-vscode issue or a Vetur issue. Vetur issue here is: vuejs/vetur#658 ·
🌐
GitHub
github.com › vuejs › vetur › issues › 1094
The right way to setup vscode vetur eslint prettier · Issue #1094 · vuejs/vetur
February 14, 2019 - This linting is not configurable and based on a fixed version of eslint-plugin-vue. If you would like to configure the template linting rules:" ... { "eslint.validate": [ "javascript", "javascriptreact", { "language": "vue", "autoFix": true } ], " vetur.validation.template": false // doc said Turn off Vetur's template validation. "prettier.eslintIntegration": true, // this line is still need to be true???
Author   aboutjquery
🌐
Reddit
reddit.com › r/vuejs › setting up a vue project with eslint/prettier/vs code
r/vuejs on Reddit: Setting up a vue project with eslint/prettier/vs code
March 2, 2018 -

Hi everyone,

I am trying to create the following:

  • Vue.js project that uses ESlint + prettier

  • ESlint config uses the "recommended" config

  • Visual Studio code that runs with the prettier extension

The problem is, some rules are different between the vscode extension and the standard prettier config vue ui adds, for example:

eslint(prettier) thinks this is correct:    
<router-view/>
vscode(prettier) thinks this is correct:
<router-view />

Problem is, when I save, these two are in a permanent conflict with eachother.

So my question is, how are you guys doing this? How are you guys running your projects in combination with vscode?

Any help is greatly appreciated.

🌐
Jongallant
blog.jongallant.com › home › 2019 › how i resolved vue.js, vscode, vetur, prettyhtml, and prettier formatting and es lint issues
Jon Gallant - How I Resolved Vue.js, VSCode, Vetur, Prettyhtml, and Prettier Formatting and ES Lint Issues
February 4, 2019 - From what I could find, there’s no way to tell Prettier to not wrap. So, I had to abandon Prettier as well. ... - Prettier is out because it always wraps attributes - without a way to disable it. Prettyhtml can disable the attribute wrap, but it removes all whitespace. I decided that I want to continue to use Vetur (The VS Code Extension) and the the only remaining option is `js-beautify-html` instead of Prettyhtml or Prettier. ... Did a format…and whitespace was retained in my .vue files, but attributes were still being wrapped, so I dug and found the `wrap_attributes` settings and added this:
🌐
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 - Excited to create a simple project in visual studio as a beginner, behold Eslint/prettier errors screaming at me, believe me this is not a good feeling. It just sucks the development excitement out of you. Enough of the talk from me, lets get started. In the snippet below are the Eslint/prettier warning I encountered. ... This affected my Typescript variable declarations,, for example when I declared a variable called birthDateMenu and gave it a type of Boolean I was having errors. ... So this is how I solved this error: . In your Vue file explore, look for a file called eslintrc.js reference to the below image.
🌐
Reddit
reddit.com › r/vuejs › vs code with prettier and es lint setup with vue
r/vuejs on Reddit: VS Code with Prettier and ES Lint setup with Vue
November 16, 2021 -

I seem to struggle to properly configure VS Code with Prettier and ESLint and Vue snippets.

I have found many blogs and articles but I somehow still struggle to configure it the way I want. Is there somewhere a guide which describes in easy language how to set it up and how to configure them with the extensions?

Edit: with Vite

🌐
Vuejs
vuejs.github.io › vetur › guide › formatting.html
Formatting | Vetur
The Format Selection command does not work. ... Vetur bundles all the above formatters, but vetur.useWorkspaceDependencies: true, it'll prefer to use the local version in your project. You can choose each language's default formatter in VS Code config, vetur.format.defaultFormatter. Setting a language's formatter to none disables formatter for that language. ... { "vetur.format.defaultFormatter.html": "prettier", "vetur.format.defaultFormatter.pug": "prettier", "vetur.format.defaultFormatter.css": "prettier", "vetur.format.defaultFormatter.postcss": "prettier", "vetur.format.defaultFormatter.scss": "prettier", "vetur.format.defaultFormatter.less": "prettier", "vetur.format.defaultFormatter.stylus": "stylus-supremacy", "vetur.format.defaultFormatter.js": "prettier", "vetur.format.defaultFormatter.ts": "prettier", "vetur.format.defaultFormatter.sass": "sass-formatter" }
🌐
GitHub
github.com › prettier › prettier-vscode › issues › 3906
No longer eligible as formatter for many types of files · Issue #3906 · prettier/prettier-vscode
January 16, 2026 - At first I thought this might be an issue with just 'vue' files but the extension is no longer eligible as a formatter for seemingly any major file (it's blocking me on at least .vue / .ts and .js for the moment... I'm normally in Cursor but I have Antigravity installed without updates for about a month - opened that up and the extension was listed as needing to restart after an update. Prior to restarting AG I was able to format the various files and after the release this morning I was no longer able to format any file. ¯_(ツ)_/¯ ... Open commands --> Format Document With... --> Prettier no longer listed
Author   claylevering
🌐
Technicallyfletch
technicallyfletch.com › how-to-setup-eslint-and-prettier-with-vscode-and-vuejs
How to setup ESLint and Prettier with VS Code and VueJS
July 20, 2020 - technicallyfletch.com is your first and best source for all of the information you’re looking for. From general topics to more of what you would expect to find here, technicallyfletch.com has it all. We hope you find what you are searching for!