DEV Community

Discussion on: Mac commands in VSCode: A requiem for Windows

Collapse
 
mjsarfatti profile image
Manuele J Sarfatti

Well, instead of using a linter (such as eslint), it's recommended to use a formatter (two of the most used ones are prettier for JavaScript, TypeScript, JSON, CSS; and phpfmt for PHP. The reasone is that they assolve two slightly different roles.

In 99% of my projects I have a linter to protect me from syntax errors, and a formatter to beautify my code whenever I hit Cmd+S.

Sometimes I want to format the document but not save it yet, and that's when I use Alt+Shift+F.

Nothing is slower or takes longer though, the formatter takes literally less than the blink of an eye to do its work!