3 ms·
Prettier has a VSCode extension to autoformat on save. https://prettier.io/docs/en/install.html https://prettier.io/docs/en/install.html
by dsteinman 5y ago
Prettier has a VSCode extension to autoformat on save.
https://prettier.io/docs/en/install.html https://prettier.io/docs/en/install.html
- Waterluvian 5y agoYes, very true. For TypeScript I do use Prettier so yeah, there _is_ an extension involved. For others, this is basically what it takes (plus making the conscious decision to enforce formatting on your repo, which I think you should!): Install the plugin and add this config: "[typescript]": { "editor.defaultFormatter": "esbenp.prettier-vscode", "editor.formatOnSave": true }
- 0x008 5y agoWhat is the benefit of using prettier as opposed to the built in typescript formatter?
- Isthatablackgsd 5y agoI believe it is something to do with style formatting than the syntax formatting. I use VSCodium for HTML/CSS and I use Prettier to "style" it in a particular way. Some will style it into a long code and other will style it in chucks.