Registry / testing / eslint-config-babel

eslint-config-babel

JSON →
library9.0.0jsnpmunverified

ESLint configuration preset for Babel's own codebase. Version 9.0.0 last updated 2021. Not actively maintained; the Babel team now uses @babel/eslint-plugin. This config enforces strict formatting and is primarily intended for internal Babel projects, not general use. Requires babel-eslint and eslint-plugin-flowtype as peer dependencies. Replaced by @babel/eslint-config in Babel 7.12+.

npm install eslint-config-babel
INSTALL
IMPORT
SIG · ESLINT-CONFIG-BABE
E
eslint-config-babel
testingjavascriptv9.0.0
Install
Import
Disk
Pass rate
0/ 6
Env Coverage0 / 6
glibc
1822
musl
1822
Install & Compatibility
Where this runs
tested against v? · npm install
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
node 18226 runs
build_error
glibc
node 18226 runs
build_error
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

default config
module.exports = { extends: ['babel'] }
module.exports = { extends: ['eslint-config-babel'] }
When using extends in .eslintrc, you can omit the 'eslint-config-' prefix.
babel (ESM)
import babel from 'eslint-config-babel'; export default { extends: ['babel'] }
import { babel } from 'eslint-config-babel'
This package does not export a named member; it's a default export object.
require (CommonJS)
const babel = require('eslint-config-babel'); module.exports = { extends: ['babel'] }
const { babel } = require('eslint-config-babel')
CommonJS usage requires default import.

Basic ESLint configuration using eslint-config-babel for a Node.js project with Flowtype support.

// .eslintrc.js module.exports = { extends: ['babel'], parserOptions: { ecmaFeatures: { jsx: true }, }, env: { es6: true, node: true, }, plugins: ['flowtype'], rules: { 'flowtype/define-flow-type': 'warn', }, };
Debug
Known issues
deprecatedeslint-config-babel is no longer actively maintained; use @babel/eslint-config instead.
fix
Switch to @babel/eslint-config and uninstall eslint-config-babel.
affects: >=9.0.0
breakingVersion 9.0.0 requires babel-eslint ^10.0.0 || ^11.0.0-0 – version 12+ incompatible.
fix
Downgrade babel-eslint to v10 or v11, or migrate to @babel/eslint-parser.
affects: >=9.0.0
gotchaThe config expects eslint-plugin-flowtype v3; install it as a devDependency.
fix
Run: npm install --save-dev eslint-plugin-flowtype@^3.0.0
affects: >=9.0.0
Errors
Common errors & fixes
Error: Failed to load plugin 'flowtype' declared in 'node_modules/eslint-config-babel/index.js': Cannot find module 'eslint-plugin-flowtype'
Missing required peer dependency eslint-plugin-flowtype.
fix
npm install --save-dev eslint-plugin-flowtype@^3.0.0
Error: Cannot find module 'babel-eslint'
Missing required peer dependency babel-eslint.
fix
npm install --save-dev babel-eslint@^10.0.0
Warning: eslint-config-babel is deprecated. Use @babel/eslint-config instead.
Package is no longer maintained.
fix
Migrate to @babel/eslint-config as recommended.
Upgrade
Version history
9.0.0latest on npm
Audit
Dependencies
babel-eslintrequiredPeer dependency required for parsing Babel-transformed code
eslint-plugin-flowtyperequiredPeer dependency for Flow type annotations
Agent activity
4 hits · last 30 days
node
4
Resources
eslint-config-babel — npm install eslint-config-babel · libregistry