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