Skip to main content
A mostly reasonable approach to JavaScript. This guide covers everything from primitive types and variable declarations to ES6+ patterns, React/JSX conventions, and the ESLint configs that enforce it all automatically.

Getting Started

Set up ESLint with Airbnb’s config in minutes and start writing consistent JavaScript today.

Core Language Rules

Explore rules for types, references, objects, arrays, functions, and modern ES6+ patterns.

React & JSX Guide

Style conventions for React components, JSX syntax, props, hooks, and accessibility.

ESLint Config Reference

Learn about the eslint-config-airbnb and eslint-config-airbnb-base npm packages.

What’s covered

The Airbnb JavaScript Style Guide is organized into two main sections:

Style Guide

30+ rule categories covering the entire JavaScript language surface — variables, functions, classes, modules, naming conventions, formatting, and more. Each rule includes rationale and good/bad examples.

ESLint Packages

Two published npm packageseslint-config-airbnb (with React) and eslint-config-airbnb-base (without React) — to automatically enforce these rules in your projects.

Quick install

Get started immediately by installing the ESLint config that matches your project:
npx install-peerdeps --dev eslint-config-airbnb
Then add to your .eslintrc:
{
  "extends": "airbnb"
}

Style guide overview

2

Functions & Classes

4

Specialized Guides

Additional guides for React/JSX and CSS-in-JavaScript.
This guide assumes you are using Babel and requires babel-preset-airbnb or equivalent. It also assumes you are installing shims/polyfills in your app, with airbnb-browser-shims or equivalent.

Build docs developers (and LLMs) love