EU 🇪🇺 | Art, Tech & Good Vibrations 🤳 | Founder of ᴛᴏᴍᴏʀʀᴏᴡ 🌞 hellotomorrow.agency • Just started working on a new endeavour 👉 usepoe.app • Follow me on Twitter!
Location
Brussels, Belgium
Work
UX Engineer, Product Manager, sometimes Designer at Self
I love the auto-formatter command!! A few of my instructors have teased me about using it instead of my linter but even that can take longer right?! When it's crunch time this is a definite go-to as well
EU 🇪🇺 | Art, Tech & Good Vibrations 🤳 | Founder of ᴛᴏᴍᴏʀʀᴏᴡ 🌞 hellotomorrow.agency • Just started working on a new endeavour 👉 usepoe.app • Follow me on Twitter!
Location
Brussels, Belgium
Work
UX Engineer, Product Manager, sometimes Designer at Self
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!
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
I'll add 2 shortcuts I find myself using all the time:
⌘+/
: Comments/un-comments selected lines⌥+⇧+F
: Auto-formats the documentI love the auto-formatter command!! A few of my instructors have teased me about using it instead of my linter but even that can take longer right?! When it's crunch time this is a definite go-to as well
Well, instead of using a linter (such as
eslint
), it's recommended to use a formatter (two of the most used ones areprettier
for JavaScript, TypeScript, JSON, CSS; andphpfmt
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!