Software Engineer ·
Shared a protip
Visual Studio CodeVisual Studio Code

Prettier not formatting code on save in Visual Studio Code? - I've come across the same issue and took me a long time googling around to find the issue.

It is actually a very simple fix. Add the below to your Visual Studio Code settings.json

"[javascript]": {
    "editor.formatOnSave": true
"[javascriptreact]": {
  "editor.formatOnSave": true
11 upvotes·61.1K views
Avatar of Johnny Bell

Johnny Bell

Software Engineer