Skip to main content
Airbnb publishes two ESLint shared config packages. Both enforce the Airbnb JavaScript style guide and cover ECMAScript 6+, but they differ in scope.

Packages at a glance

PackageReact rulesjsx-a11yreact-hooksPeer deps
eslint-config-airbnbYesYesYeseslint, import, react, react-hooks, jsx-a11y
eslint-config-airbnb-baseNoNoNoeslint, import

Which package should you use?

Use eslint-config-airbnb when your project uses React. It includes all base JavaScript rules plus React, JSX, accessibility, and hooks linting. Use eslint-config-airbnb-base when your project does not use React — for example, a Node.js API, a CLI tool, or a plain JavaScript library. It has a lighter dependency footprint.
eslint-config-airbnb depends on eslint-config-airbnb-base internally, so you only need to install one package.

Package pages

eslint-config-airbnb

Full config with React, JSX, accessibility, and hooks rules.

eslint-config-airbnb-base

Base config without React — suitable for any JavaScript project.

Rule categories

The configs are organized into rule files that you can explore individually.

Best practices

Error prevention rules covering code correctness and safe patterns.

Style

Formatting and naming convention rules.

Imports

Import ordering, resolution, and module hygiene rules.

React

React component, JSX, and prop-type rules.

Getting started

See the installation guide for step-by-step setup instructions for both packages.

Build docs developers (and LLMs) love