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 packages —
eslint-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:.eslintrc:
Style guide overview
Core Language
Functions & Classes
Conventions for functions, arrow functions, classes and modules.
Code Style
Guidelines for formatting, naming conventions, comments and events.
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.