In my Nuxt application where ESlint and Prettier are installed and enabled, I switched to Visual Studio Code editor.
When I open a .vue file and pre
1 .Use the other extension prettier was not working for me i just use the other VSCODE extension named PrettierNow
i think this will help, done for me.Checkout the extension here
2 .From Latest Updates of prettier you need to add .prettierrc
file in your root of the projects if you want to stick with prettier.
An example of .prettierrc
is this-
{
"tabWidth": 4,
"singleQuote": true,
"semi": false
}
I Rolling back prettier to 1.7.3 and fixed it
Some times with auto plugins update Required files used by Prettier might go missing .
Check this path if files are present here or folder is empty
C:\Users\YOURUSERNAME\.vscode\extensions\esbenp.prettier-vscode-2.2.2\out
If missing uninstall and reinstall prettier
Go to Manage(located on left-bottom corner) -> Settings -> Users tab -> Text-Editor -> Formatting -> check the format on save
if not working then close and again open your vscode editor
I faced this problem and these three steps solved my problem:
Recently I got the same problem, that Prettier does not format code automatically on saving. Checking Prettier, I saw an error: Invalid "arrowParens"
value. Expected "always" or "avoid", but received true
.
The error message was seen when I clicked this:
It turned out that I have Prettier Now installed also. This has a boolean value in my config file. After uninstalling Prettier Now, everything works fine.