In my Nuxt application where ESlint and Prettier are installed and enabled, I switched to Visual Studio Code.
When I open a .vue file and press CMD+ Shift + P and choose Format Document, my file does not get formatted at all.
My .prettierrc settings:
{
"tabWidth": 2,
"semi": false,
"singleQuote": true
}
I have so many source code lines, so I cannot format them manually. What am I doing wrong?
["vue"]
.prettierrc
line"disableLanguages": []
. Docs says that this change requires restartCMD
+Shift
+P
then Format Document, then choosing Prettier as my default formatter helped me :Dvar x = "test";
written in HTML file when I should have written it in a*.JS
file. When I wrote the JS code into a JS file it got formatted tovar x = 'test'
.