- Install Prettier
- Update User Settings
{ "editor.formatOnPaste": false, "editor.formatOnSave": false, }
- Use it with:
CMD + Shift + P
->Format Document
CMD + Shift + P
->Format Selection
- Search for
prettier
in the Default User Settings in case you would like to adapt some formatting rules.
Alternatively you can set up the main formatting rules per project or in your user directory ~/
in a .prettierrc
file like the following:
# See https://prettier.io/docs/en/options.html for available options
printWidth: 100
useTabs: true
singleQuote: true
bracketSpacing: false