eslint-config-airbnb is Airbnb’s full ESLint shared config. It extends eslint-config-airbnb-base with additional rules for React, JSX accessibility, and React Hooks.
Current version: 19.0.4
What it includes
- All rules from
eslint-config-airbnb-base(best practices, style, imports, ES6, variables, errors, strict, Node) - React component and JSX rules via
eslint-plugin-react - Accessibility rules for JSX via
eslint-plugin-jsx-a11y - React Hooks rules via
eslint-plugin-react-hooks(opt-in via/hooksentry point)
Peer dependencies
The following packages must be installed alongsideeslint-config-airbnb:
| Package | Required version |
|---|---|
eslint | ^7.32.0 || ^8.2.0 |
eslint-plugin-import | ^2.30.0 |
eslint-plugin-jsx-a11y | ^6.10.0 |
eslint-plugin-react | ^7.36.1 |
eslint-plugin-react-hooks | ^5.1.0 |
Entry points
Default (airbnb)
The main entry point includes all base JavaScript rules plus React, JSX, and accessibility rules. React Hooks rules are not enabled by default.
.eslintrc.json
airbnb/hooks
Adds linting rules for the React Hooks API (eslint-plugin-react-hooks). Requires React 16.8+.
.eslintrc.json
react-hooks/rules-of-hooks— errorreact-hooks/exhaustive-deps— error
airbnb/whitespace
Errors only on whitespace rules; all other rules become warnings. Useful when gradually adopting the config on an existing codebase.
.eslintrc.json
airbnb/base and airbnb/legacy (deprecated)
Node.js compatibility
Configuration examples
Minimal React setup
.eslintrc.json
React with Hooks rules
.eslintrc.json
Override specific rules
.eslintrc.json
Allow .tsx and .ts file extensions
By default, only .jsx files may contain JSX. To allow TypeScript files:
.eslintrc.json