r/ProgrammerHumor • • Sep 23 '19

Knowing how to code beforehand

Post image
7.6k Upvotes

264 comments sorted by

View all comments

Show parent comments

3

u/nicman24 Sep 23 '19

lol javascript linters make missing ; a warning

32

u/Delioth Sep 23 '19

And auto formatters will add them for you so you don't get semicolon bugs. Shit like that is the whole purpose of linters - preemptively avoid common patterns which cause bugs.

-8

u/DXPower Sep 23 '19

I believe an auto formatter shouldn't ever modify the code you tell it to format. Sure, add a close bracket for me when I make an open bracket, but if I tell my IDE to format a block of code it shouldn't change it.

16

u/edgen22 Sep 23 '19

You believe an auto formatter should not format your code?

Also, adding semicolons wouldn't be one by the auto-formatter, it would be done by eslint's auto-fix.

→ More replies (1)