Format document not running prettier?
See original GitHub issueWhat’s the best way to diagnose this issue? I have prettier installed and enabled. It used to work fine. I don’t know when exactly it stopped working. When I have for instance this:
<p>test</p>
<Modal open={this.state.addingReview} ></Modal>
And run Format Document, it results in this:
<p>test</p>
<Modal open={this.state.addingReview} ></Modal>
Whereas running prettier from the command line results in:
<p>test</p>
<Modal open={this.state.addingReview} />
Issue Analytics
- State:
- Created 6 years ago
- Reactions:12
- Comments:36 (4 by maintainers)
Top Results From Across the Web
Why does Prettier not format code in VS Code? - Stack Overflow
Click on Preferences: Open Settings (JSON) from the suggestion dropdown. Inside the settings.json file, Check if "[html]" key exists. If the key ...
Read more >Format on Save (prettier) stopped working with latest update
Same thing happened to me just now. I set prettier as the Default Formatter in Settings and it started working again. My Default...
Read more >Prettier not working in VSCode – possible fixes - LinuxPip
In VSCode, open a HTML/JS file and open the Command Palette by selecting View > Command Palette or press Ctrl+Shift+P and search for...
Read more >Prettier stopped working in VS Code - DeveloperF1.com
Open settings by pressing CTRL + , or using the menu item File -> Preferences -> Settings · Type default formatter into the...
Read more >How To Use Prettier in VS Code - Alphr
1. Open VS Code and press the Extensions icon. 2. Input “Prettier” in the search bar and hit the magnifying glass icon. 3....
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

@lorensr Seems the extension did not start. Can you take a look at dev console? Help -> toggle developer tools -> console
Try reinstalling:
$HOME/.vscode{,-insider}/extensions/esbenp.prettier-vscode-1.2.2doesn’t existWhat happened in my case, is VSC update deleted some of my user settings, one of which was the
formatOnSave, which is why the extension seemed broken ( as i’m used to format on save ).Setting the property back was easy enough. If that’s the case, check if you have
"editor.formatOnSave": trueset within the settings.