javascript

airbnb

Airbnb's widely adopted style guide for writing JavaScript, explaining rules for variables, functions, classes, modules and React, with an accompanying ESLint config so teams can enforce consistent code automatically.

JavaScriptCreated

What is airbnb/javascript?

This is Airbnb's JavaScript style guide, a widely adopted set of rules for writing consistent, readable JavaScript. It covers types, references, objects, arrays, strings, functions, classes, modules, variables, comparisons and more, with an example for each rule. The guide assumes Babel and polyfills are in use, and it is available in several languages.

It is typically enforced with a linter, and the project provides a configuration so teams can apply the rules automatically rather than in code review. Related guides cover React, CSS-in-JavaScript, CSS and Sass, and Ruby.

It suits teams that want a shared style for a JavaScript codebase, and developers who want to learn the conventions many production projects follow.

arrow-functionses2015es2016es2017es2018es6eslintjavascript