Hacker News new | past | comments | ask | show | jobs | submit login

Yes, 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
  }



What is the benefit of using prettier as opposed to the built in typescript formatter?


I 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.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: