An ESLint plugin companion to babel-eslint that re-implements core ESLint rules to handle Babel experimental features such as decorators, optional chaining, class properties, do expressions, BigInt, and JSX fragment syntax. Version 5.3.1 is the latest stable release; it requires ESLint >=4.0.0 and Node >=4. The plugin replaces problematic built-in rules with Babel-aware versions to avoid false positives/negatives, and several older rules have been deprecated in favor of native ESLint rules or eslint-plugin-flowtype. It uses eslint-rule-composer for rule composition, is actively maintained, and supports autofix for some rules (marked with ๐ ).
npm install eslint-plugin-babelVerified import paths โ ran on the pinned version, not inferred.
Shows installation, plugin setup, and rule configuration. Remember to disable the core versions of replaced rules.
Upgrade ESLint to >=4.0.0 and Node to >=4. Ensure eslint-rule-composer is installed.
Use corresponding core ESLint rules (or eslint-plugin-flowtype for flow-object-type) as listed in the README.
Use core ESLint rule no-await-in-loop (supported since ESLint 3.12.0).
Install eslint-plugin-flowtype and use flowtype/object-type-delimiter.
Disable the core rule (e.g., 'new-cap': 'off') when using the babel version.
Add '"plugins": ["babel"]' to your .eslintrc.
Run 'npm install eslint-plugin-babel --save-dev'
Add '"plugins": ["babel"]' to your .eslintrc.
Install babel-eslint: 'npm install babel-eslint --save-dev' and set "parser": "babel-eslint" in your ESLint config.
Replace 'babel/flow-object-type' with 'flowtype/object-type-delimiter' and install eslint-plugin-flowtype.