Personal setup for Prettier in VS Code.
- You'll need Prettier VS Code extension (
esbenp.prettier-vscode
).
- After installing Prettier extension, use
CTRL + Shift + P
to open the command bar - Type
Preferences: Open User Settings (JSON)
- Add the following lines inside your JSON config:
"editor.defaultFormatter": "esbenp.prettier-vscode",
"editor.formatOnSave": true
- In your project's root, add the
.prettierrc
file. - For any additional config, visit Prettier docs