Gangmax Blog

JavaScript Code Style Guide

I’m looking for a JavaScript code style guide. This post lists 5 JavaScript Style Guides:

  1. Airbnb JavaScript Style Guide

  2. Google JavaScript Style Guide

  3. Idiomatic JavaScript Style Guide

  4. JavaScript Standard Style Guide

  5. jQuery JavaScript Style Guide

I choose “1” instead of the others because:

  1. It seems “3” and “5” are not widely used.

  2. “2” looks like a company standard(although a big one) rather than an open stardard, for example it’s not hosted on GitHub.

  3. “4” has something I don’t like, such as “no semicolons”.

Also considering the fact that “Airbnb JavaScript Style Guide“ has the most GitHub stars among all the five, I think that is the one I should use.