Consider StandardJS as an alternative to AirBNB
antony opened this issue · comments
Less popular than AirBNB's guide, but a better idea:
Advantages:
- You can
npm install --save-dev standard
, thenstandard
as part of yournpm test
to ensure code is written in a standard way. - No bikeshedding! Bikeshedding is a real time-killer, endless discussions about what styles to adopt.
- No configuration. For the reasons above, configuration is actually prohibited! One style - no arguments.
👎 Because it uses the highly uncommon "no semicolon" rule. I know it's fine and mostly doesn't really differ, but it's not the "default" way to write JavaScript.
I don't think there is a 'default' way to write JavaScript. Semicolons are a bit of a legacy from a long time ago. I've been programming Java apps using Groovy for the last 8 years, which drops semicolons, and when I moved to NodeJS, I looked for the same thing.
I agree it's not the default way, but if I was learning from 0, which is what this guide is about, I'd prefer to learn without.
Sure, I totally get why you don't like them. But AFAIK this project is about getting started ASAP and "as easy/normal as possible", not getting started "as good as possible". And with default I mean, that it feels like 99% of JS code has semicolons.
Thanks for the discussion. Since we already have a solution for this, and the proposed solution is not 10x better, our time is better spent writing the upcoming sections.
Also the playbook is not about learning from 0. It doesn't teach you JavaScript. It just helps you enter the node ecosystem without getting overwhelmed.
Also if someone did learn no-semicolons as a result of the playbook recommendation, then they would undoubtedly be confused when they read most JS code.