News for hackers. Stuff that matters.
Re:Airbnb JavaScript Style Guide by z3t4 on Friday July 03, 2015 @10:09AM (#9825662)
I love these kind of style guides. But I also love to prove them wrong.

Unless you "use strict", it's better to put var in-front of every variable if you put them on separate lines.

  var foo = 1,
      bar = 2
      baz = 3
vs

   var foo = 1;
   var bar = 2;
   var baz = 3;
Forgetting a comma or semicolon in the first example might lead to silent bugs that will take hours to find.
Re:Airbnb JavaScript Style Guide by savanaly on Friday July 03, 2015 @11:14AM (#9825993)
Isn't this exact rule already in the guide?

https://github.com/airbnb/javascript#13.2

Re:Airbnb JavaScript Style Guide by z3t4 on Friday July 03, 2015 @01:55PM (#9826951)
Ahh, someone might just have added it to troll me, or I'm crazy.
Re:Airbnb JavaScript Style Guide by dugmartin on Friday July 03, 2015 @01:12PM (#9826742)
If you add a lint checker, like jshint, to your build steps those kinds of bugs are found instantly. You can also add these specific style guide checks to your build steps using jscs (https://www.npmjs.com/package/jscs).