VSCode - prettier

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 © 2020 Code Green LLC