Airbnb JavaScript Style Guide

Follow Airbnb’s JavaScript Style Guide for conventions when writing and reviewing JavaScript code.

github.com/airbnb/javascript
Airbnb JavaScript Style Guide homepage screenshot

About Airbnb JavaScript Style Guide

The Airbnb JavaScript Style Guide is a GitHub repository that sets out coding conventions for JavaScript. It covers topics such as types, references, objects, arrays, functions, classes, modules, naming, comments, and testing. Each rule includes a short explanation, and most rules include bad and good code examples. Where a rule has an ESLint equivalent, the ESLint rule name is listed.

The guide assumes that code is compiled with Babel, using babel-preset-airbnb or an equivalent, and that shims or polyfills are installed with airbnb-browser-shims or an equivalent. The guide notes that Symbols and BigInts cannot be faithfully polyfilled, so they should not be used when targeting environments that lack native support. Separate guides cover React, CSS-in-JavaScript, CSS and Sass, and Ruby. The ES5 guide is marked as deprecated. The guide is also available in other languages.

Key features

  • Rules for primitive and complex types, with code examples
  • Guidance on const, let, and var, including block scoping differences
  • Object literal and property shorthand conventions with examples
  • Rules linked to named ESLint rules where applicable
  • Coverage of functions, classes, modules, naming, and testing conventions
  • Separate style guides for React, CSS-in-JavaScript, CSS and Sass, and Ruby
Best for: JavaScript developers and teams that want a documented set of conventions for writing and reviewing code, especially projects built with Babel.
Good for
  • Most rules include a short explanation of the reasoning behind them
  • Rules include bad and good code examples for comparison
  • Named ESLint rules make it possible to check some conventions with tooling
Watch out for
  • Assumes a Babel setup and polyfill shims, or equivalent tools
  • Symbols and BigInts should not be used when targeting environments without native support
  • The ES5 guide is deprecated

Airbnb JavaScript Style Guide at a glance

Type
Open-source project
Pricing
Not confirmed. Check the site
Open source
Yes · Source code
Language
English
Last checked
Oct 6, 2026 · Online when checked
Listed
Oct 5, 2026

Airbnb JavaScript Style Guide alternatives

Tools and sites you could use instead, ranked by how closely they match.

All 24 alternatives

Thrustcurve3

github.com/JohnCoker/thrustcurve3

This repository contains code for the ThrustCurve.org site, which began as a collection of simulator files based on actual rocket motor firing data.

Open source
24 alternatives

Popular in Science, Math & Technology

Well-known listings from the same topic.

All 276

Airbnb JavaScript Style Guide FAQ

Does the guide assume a specific build setup?
Yes. The guide assumes Babel is used with babel-preset-airbnb or an equivalent, and that shims or polyfills are installed with airbnb-browser-shims or an equivalent.
Is the guide available in other languages?
The guide states that it is available in other languages. The repository has a Translation section that lists them.
Are there style guides for other areas besides plain JavaScript?
Yes. The repository links to separate guides for React, CSS-in-JavaScript, CSS and Sass, and Ruby. The ES5 guide is marked as deprecated.
Is something wrong or out of date?

Tell us and an editor will check it.

Own this website?

Claim the listing and suggest updates yourself. An editor checks every claim first.

Claim this listing