logo My Digital Garden

VSCode - prettier

By James Kolean on Jul 22, 2022
Tools
banner

I spent way too long figuring out why Prettier was not working in VSCode.

Timo Ernst had the answer here

This is what Tim says:

First, press shift + cmd + p (Mac), enter “settings” and choose “Preferences: Open Settings (JSON)”. Then add the following:

"[typescript]": { "editor.defaultFormatter": "esbenp.prettier-vscode" },
"[typescriptreact]": { "editor.defaultFormatter": "esbenp.prettier-vscode" }

Make sure you have set “editor.formatOnSave”: true

© Copyright 2024 Digital Garden cultivated by James Kolean.