prettier-vscode: prettier failing with the new update of vs code (1.33)
With the new version of VS Code my prettier doesn’t format any longer.
from my settings:
"[javascript]": { "editor.formatOnSave": true, "editor.defaultFormatter": "esbenp.prettier-vscode" }
The error I get:
EDIT: It seems to work when I install prettier as a devdependency, of course, I don’t want to be doing this on every project.
About this issue
- Original URL
- State: closed
- Created 5 years ago
- Reactions: 7
- Comments: 19 (1 by maintainers)
This issue seems to be improved by the updates in the VS Code 1.35 release (May 2019):
The key to fixing this error and having everything working was to set Prettier as the default formatter.
Here’s how I have VS Code and Prettier configured:
Here’s the relevant part of my
settings.json
:With this configuration, JavaScript files will be automatically formatted on save by Prettier.
Tested using VSCode 1.35.1 with Prettier 1.9.0 on macOS 10.14.5 “Mojave”.
Same issue, 1.33.1
Had the same issue, @ryanjbonnell’s solution worked for me
I have the same issue with v.1.33.1 Here’s my settings.json
None of these work, not even autoIndent