r/javascript • • Sep 12 '16

JavaScript Standard Style Guide

https://github.com/feross/standard
0 Upvotes

29 comments sorted by

View all comments

14

u/PolarZoe Sep 12 '16

"Don't use ;", noped the fuck out.

1

u/kasperpeulen Sep 12 '16

10

u/PolarZoe Sep 12 '16

I've read the articles and that video you linked and those few little instances are the exact reason to enforce the semicolons.

I don't want to have to remember where I do need to use them, and don't want to live in fear that our juniors make a mistake remembering these rules, so no thinking necessary, always use semis.

Also, it gets confusing when mixing different languages.

Don't get me wrong I think a PSR like codestyle for JS would be great, but not with these rules unfortunately.

3

u/kasperpeulen Sep 12 '16

If you use this linter, then it will warn you in those cases you need to add a semi colon. You will be trained within a couple of days exactly where you have to add a semicolon.

But besides that, I don't see the problem about remembering one simple rule... Your juniors may make a mistake one time... So the program crashes, they figure out what they did wrong, and they fix it... Simple