5 JavaScript Style Guides — Including AirBnB, GitHub, & Google

November 05, 2017 0 Comments

5 JavaScript Style Guides — Including AirBnB, GitHub, & Google

 

 

Udemy Black Friday Sale — Thousands of Web Development & Software Development courses are on sale for only $10 for a limited time! Full details and course recommendations can be found here.

Whether you’re just starting to learn JavaScript, or getting ready for your big interview with AirBnB, here are 5 style guides that can help you write cleaner code.

A style guide is a set of standards that outline how code should be written and organized. As you read through these guides, you can get an idea for how code is written at the respective companies.

For one main reason: Everyone writes code differently. I may like to do something one way, and you may like to do it a different way. That’s all fine and dandy as long as we each work on our code. But what happens when you have 10, 100, or even 1,000 developers all working on the same codebase? Things get messy very quickly. Style guides are created so new developers can get up to speed on a code base quickly, and then write code that other developers can understand quickly and easily!

A mostly reasonable approach to JavaScript

Airbnb has one of the most popular JavaScript style guides on the internet. It covers nearly every aspect of JavaScript as well.

You can view Airbnb’s style guide on GitHub.

A JavaScript source file is described as being in Google Style if and only if it adheres to the rules herein

You can view Google’s style guide on GitHub.

All code in any code-base should look like a single person typed it, no matter how many people contributed.

Another of the most popular JavaScript style guides, the Idiomatic guide is available in multiple languages, and is open to pull requests.

You can view the Idiomatic style guide on GitHub.

JavaScript style guide, with linter & automatic code fixer. No configuration. Automatically format code. Catch style issues & programmer errors early.

This style guide is used by many tech companies including NPM, GitHub, mongoDB, and ZenDesk.

You can view the JavaScript Standard style guide on GitHub.

Want to commit some code to help make jQuery better? Read up on their style guide and learn how their JavaScript is formatted.

You can view the jQuery style guide on their website.


Tag cloud