How to run Prettier on save for VS Code


Install Visual Studio Code and the extension Prettier.

Press Command + Shift + P (or Ctrl + Shift + P) and open settings.json.

Add the following to settings.json:

  "editor.defaultFormatter": "esbenp.prettier-vscode",
  "editor.formatOnSave": true


Please support this site and join our Discord!