eslint-config-airbnb-babel
raw JSON → 0.2.2 verified Sat Apr 25 auth: no javascript maintenance
An ESLint shareable config that extends Airbnb's ESLint rules to add Babel-specific support via eslint-plugin-babel. Version 0.2.2 is the latest stable release, with minimal maintenance updates. It is designed for projects using Babel alongside Airbnb's JavaScript style guide. Key differentiator: it integrates Babel-aware linting (e.g., for babel-eslint parse options) while preserving Airbnb rule strictness.
Common errors
error Error: Failed to load plugin 'babel' declared in '.eslintrc' ↓
cause Missing eslint-plugin-babel dependency
fix
npm install --save-dev eslint-plugin-babel
error Configuration for rule 'babel/semi' is invalid ↓
cause Incompatible versions of eslint-plugin-babel and this config
fix
Update eslint-plugin-babel to >=5.0.0 or downgrade eslint-config-airbnb-babel
Warnings
gotcha Configuration order matters: 'airbnb-babel' must come after 'airbnb' in the extends array. ↓
fix Always specify the extends array with 'airbnb' first, then 'airbnb-babel'.
deprecated This package is not actively maintained; newer versions of ESLint or Airbnb config may require manual adjustments. ↓
fix Consider using eslint-config-airbnb directly with babel-eslint parser and eslint-plugin-babel manually configured.
breaking Peer dependency for eslint-plugin-babel may conflict with newer eslint versions. ↓
fix Ensure eslint-plugin-babel version is compatible with your ESLint version.
Install
npm install eslint-config-airbnb-babel yarn add eslint-config-airbnb-babel pnpm add eslint-config-airbnb-babel Imports
- default wrong
extends: 'airbnb-babel'correctextends: ['airbnb-babel']
Quickstart
// .eslintrc.json
{
"extends": ["airbnb", "airbnb-babel"],
"rules": {
"no-unused-vars": "warn"
}
}