Registry / devops / eslint-babel-migrate

eslint-babel-migrate

JSON →
library0.1.0jsnpmunverified

Migration helper for replacing deprecated babel-eslint with @babel/eslint-parser. Current version 0.1.0, zero-dependencies, actively maintained as of 2024. Key differentiators: provides a pure function to transform ESLint config objects, reports changes, and generates package manager install commands. Supports TypeScript with bundled type definitions. Targeted release for Node 18+.

npm install eslint-babel-migrate
INSTALL
IMPORT
SIG · ESLINT-BABEL-MIGRA
E
eslint-babel-migrate
devopsjavascriptv0.1.0
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

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

migrateBabelEslintConfig
import { migrateBabelEslintConfig } from 'eslint-babel-migrate'
const migrateBabelEslintConfig = require('eslint-babel-migrate')
Package is ESM-only; no CommonJS require supported.
isBabelEslintConfig
import { isBabelEslintConfig } from 'eslint-babel-migrate'
import isBabelEslintConfig from 'eslint-babel-migrate'
Named export, not default export.
recommendedInstall
import { recommendedInstall } from 'eslint-babel-migrate'
Used to get the install command for the maintained parser.

Migrates an ESLint config from babel-eslint to @babel/eslint-parser and prints the new config, changes, and install command.

import { migrateBabelEslintConfig } from 'eslint-babel-migrate'; const oldConfig = { parser: 'babel-eslint', parserOptions: { sourceType: 'module' }, plugins: ['@babel'], }; const result = migrateBabelEslintConfig(oldConfig); console.log('Migrated config:', result.config); console.log('Changes:', result.changes); console.log('Install command:', result.install);
Debug
Known issues
breakingInput config parser must be exactly 'babel-eslint'; case-sensitive.
fix
Ensure the parser string is 'babel-eslint' (lowercase).
affects: >=0.0.0
deprecatedPackage is a migration helper; it will not be updated for future parser changes.
fix
After migration, consider using @babel/eslint-parser directly.
affects: >=0.0.0
gotchaReplaces only the parser and known legacy options; custom plugins not automatically migrated.
fix
Manually review and migrate any custom Babel plugins.
affects: >=0.0.0
Errors
Common errors & fixes
import { migrateBabelEslintConfig } from 'eslint-babel-migrate'
Using require() or wrong import syntax.
fix
Use import { ... } from 'eslint-babel-migrate' in an ESM context.
TypeError: migrateBabelEslintConfig is not a function
Importing default instead of named export.
fix
Use import { migrateBabelEslintConfig } from 'eslint-babel-migrate'.
Upgrade
Version history
0.1.0latest on npm
Audit
Dependencies

No dependency data recorded yet.

Agent activity
2 hits · last 30 days
node
2
Resources
eslint-babel-migrate — npm install eslint-babel-migrate · libregistry