DEV Community

loading...
Cover image for How to Format on Save in VSCode

How to Format on Save in VSCode

Josh Bowen
wannabe coder
・1 min read
  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 :)

Discussion (0)