javascript — The Airbnb Style Guide That Defined Modern JavaScript

Project Overview

The Airbnb JavaScript Style Guide occupies a unique position in the JavaScript ecosystem — it’s less a conventional open-source project and more a de facto standard that shaped how an entire generation of developers writes JavaScript. With over 148,000 stars on GitHub, it’s one of the most-starred repositories on the platform, and its influence extends far beyond Airbnb’s own engineering organization. The guide emerged during a pivotal transition period for JavaScript, when ES6 was gaining browser support and developers needed coherent conventions for const, arrow functions, destructuring, and modules. Rather than prescribing a rigid framework, the project codifies a set of reasoned preferences — each rule accompanied by a ‘why’ explanation that reveals the team’s engineering philosophy. The companion ESLint packages, eslint-config-airbnb and eslint-config-airbnb-base, transform these conventions into enforceable rules, making the guide practically useful rather than merely aspirational. What distinguishes this project from alternatives like StandardJS or Google’s JavaScript Style Guide is its willingness to be opinionated about formatting details while grounding those opinions in explicit reasoning about readability and bug prevention.

What It’s For

This guide serves as a reference for teams and individual developers who want a coherent, battle-tested set of JavaScript conventions without reinventing their own style decisions from scratch. It’s particularly valuable for organizations onboarding new developers, since consistent style reduces cognitive overhead during code review and makes it easier to spot actual logic errors beneath formatting noise. The guide works best when adopted alongside its ESLint configuration, which automates enforcement and catches style violations during development rather than relying on manual review. Where the guide shows its age is in areas like modern React patterns — the companion React style guide exists separately, and some conventions around class components feel dated now that hooks have become the dominant paradigm. Teams heavily invested in TypeScript may find the guide less directly applicable, since it focuses on JavaScript idioms and doesn’t address TypeScript-specific conventions around type annotations or generics. The most pragmatic approach is to use the Airbnb guide as a baseline, then layer additional rules for TypeScript, React hooks, or project-specific patterns on top.

How to Use It

The primary way to adopt this style guide is through its ESLint packages, which encode the rules as linting configurations. For most projects, you install eslint-config-airbnb (which includes React rules) or eslint-config-airbnb-base (which omits React-specific rules), then extend the configuration in your ESLint settings. The guide itself serves as the reference documentation — when a lint rule fires, you consult the corresponding section to understand the reasoning behind the convention. This two-layer approach means teams get automated enforcement with an escape hatch for understanding why a particular rule exists.

Installs the Airbnb ESLint config along with all required peer dependencies, including ESLint itself and plugins for React and import rules.

npx install-peerdeps --dev eslint-config-airbnb

Installs the base config without React-specific rules, suitable for Node.js projects or non-React frontends.

npx install-peerdeps --dev eslint-config-airbnb-base

Extends the Airbnb config in your project’s ESLint configuration to apply all style rules.

// In .eslintrc: { "extends": "airbnb" }

Recent Updates

Latest Release: v19.0.4 (2024-01-20)

Updated dependencies and minor rule refinements, with ongoing maintenance to keep ESLint plugin compatibility current.

The project has settled into a maintenance phase rather than active feature development — the core conventions are well-established, and updates primarily address dependency compatibility and incremental rule adjustments. The broader JavaScript community has shifted toward TypeScript and frameworks with built-in linting (like Next.js and Remix), which reduces the centrality of standalone style guides. Nevertheless, the Airbnb guide remains the most commonly referenced baseline for new projects, and its ‘why’ explanations continue to serve as educational material for developers learning JavaScript conventions.


Sources & Attributions

[1] The repository has 148,111 stars as of the provided data — airbnb/javascript [2] The ESLint config packages are published as eslint-config-airbnb and eslint-config-airbnb-base on npm — airbnb/javascript [3] Version 19.0.4 is the most recent release — airbnb/javascript@v19.0.4