javascriptprettierprettier-vscode

Why install prettier with a package manager when we can directly use it via an extension from a text editor?


So I've been seeing many javascript and typescript tutorials recommending to install prettier. I know prettier is a must nowadays but since we can get it directly from a extension on your IDE or text editor, why would you install the package itself from npm, yarn, etc..., instead of just using the extension?

Thanks for stopping by.


Solution

  • For continuous integration or for those times when you don't have an editor installed. Editor prettiers (and their configs) vary from IDE to IDE as well. Your "pretty" might be different from mine. If we both use the exact same tool, the results are idempotent meaning less git diff noise.