DEV Community

Cover image for How to Format on Save in VSCode
Josh Bowen
Josh Bowen

Posted on

How to Format on Save in VSCode

  1. Install Prettier in VSCode (https://marketplace.visualstudio.com/items?itemName=esbenp.prettier-vscode)
  2. Open Settings pane (Command + ,)
  3. Make sure the Editor: Format on Save property is enabled (You can search and find the property in the search bar)
  4. Set the Editor: Default Formatter to Prettier - Code formatter

If format on save was previously not working for you, these steps should fix it. This is what fixed it for me :)

Top comments (0)