npx install-peerdeps.
Install eslint-config-airbnb (with React)
Install the package and its peer dependencies
The quickest approach uses The command installs:
install-peerdeps, which resolves and installs all required peer packages in a single command.eslint-config-airbnbeslinteslint-plugin-importeslint-plugin-reacteslint-plugin-react-hookseslint-plugin-jsx-a11y
Extend the config in your .eslintrc
Add Or in YAML format:
"extends": "airbnb" to your ESLint configuration file..eslintrc.json
.eslintrc.yml
Install eslint-config-airbnb-base (without React)
Install the package and its peer dependencies
eslint-config-airbnb-baseeslinteslint-plugin-import
Configuration examples
Custom rules on top of the base config
You can override or extend any rule after extending the shared config..eslintrc.json
React project with hooks and TypeScript parser
.eslintrc.json
ES5 / legacy JavaScript
Use theairbnb-base/legacy entry point for projects that do not use ES6+.
.eslintrc.json
Whitespace-only mode
Both packages expose a/whitespace entry point that errors only on whitespace rules and downgrades all other rules to warnings. This is useful for incremental adoption.
.eslintrc.json
.eslintrc.json