@clearlint/eslint-migrate
v1.0.1
Published
CLI tool to analyze and migrate ESLint v9 configs to v10
Maintainers
Readme
@clearlint/eslint-migrate
Analyze and migrate ESLint v9 configs to v10. Understand your migration cost before you commit.
The Problem
ESLint v10 removes eslintrc format entirely. If your project uses .eslintrc, .eslintrc.json, or package.json eslintConfig, you need to:
- Convert to flat config (
eslint.config.js) - Handle removed rules
- Adjust rule options that changed
This tool analyzes your current config and generates a v10-compatible flat config.
Usage
npx @clearlint/eslint-migrate analyze [dir]
npx @clearlint/eslint-migrate generate [dir]
npx @clearlint/eslint-migrate report [dir]analyze — Understand your migration cost
npx @clearlint/eslint-migrate analyze ./my-projectOutput:
🔍 Analyzing ESLint config in: ./my-project
Config type: eslintrc
Config file: .eslintrc.json
Rules analyzed: 42
Compatible: 38
Removed: 3
Needs review: 1
Unknown: 0
Details:
✅ no-eval: compatible
❌ callback-return: removed in v10
⚠️ custom-rule: needs reviewgenerate — Create a v10 flat config
npx @clearlint/eslint-migrate generate ./my-projectCreates eslint.config.js with:
- All compatible rules preserved
- Removed rules removed (commented out with migration notes)
- Unknown rules flagged for manual review
report — Full migration report
npx @clearlint/eslint-migrate report ./my-projectGenerates eslint-migration-report.json with:
- Rule-by-rule compatibility analysis
- Effort estimate (low / medium / high)
- Step-by-step recommendations
Install
npm install --save-dev @clearlint/eslint-migrateHow it works
- Discover — Finds your ESLint config (eslintrc, flat, or package.json)
- Analyze — Checks each rule against the v10 rule set
- Generate — Creates a flat config with migration notes
- Report — Produces a structured JSON report
Migration Phases
| Phase | Description | Command |
|-------|-------------|---------|
| 1 | Config discovery | eslint-migrate analyze |
| 2 | Rule compatibility | (included in analyze) |
| 3 | Config generation | eslint-migrate generate |
| 4 | Report + effort estimate | eslint-migrate report |
Caveats
- The generated config is a starting point, not a drop-in replacement
- Custom plugin rules and shareable configs are not analyzed
- Always run
npx eslint .after migration to verify - ESLint v10 removes approximately 15 core rules — the tool flags these
Disclaimer: This tool assists with ESLint v10 migration planning. Always verify the generated config against your project's requirements. Rule behavior may differ between v9 and v10 even for compatible rules.
