Search code examples
visual-studio-codeprettier

Prettier doesn't work on VScode after update


I recently updated VSCode and Prettier is not working anymore on my JS files. Before whenever I saved my JS files, Prettier would add the semicolons for me. Now when I save, no semicolons are added. I have the plugin enabled and checked the settings to make sure I have the semicolon insertions enabled. What could be causing this error?

default settings

enabled settings

semicolons enabled


Solution

  • This one worked for me:

    1. Select View -> Command Palette (or type CMD + shift+ P)
    2. Type: Format Document
    3. Choose Prettier as your default formatter

    Original answer: Why Prettier does not format code in VSCODE?