Skip to content
Home / Migrations / ESLint .eslintrcESLint flat config (eslint.config.js)

ESLint .eslintrc ESLint flat config (eslint.config.js)

medium

ESLint v9 makes flat config the default. Legacy .eslintrc files still work with a flag but will be removed in v10. Flat config uses imports instead of extends.

Estimated: 2-4h · 5 steps
Progress0%
Step 1: Update ESLint
npm install eslint@9
Step 2: Run migration tool

Use the official migration helper to convert config.

npx @eslint/migrate-config .eslintrc.json
Step 3: Convert extends to imports

extends: ['plugin:react/recommended'] becomes import reactPlugin from 'eslint-plugin-react' and spreading into config array.

Step 4: Update ignores

.eslintignore → ignores property in eslint.config.js. Glob patterns are the same.

Step 5: Update CI scripts

Remove ESLINT_USE_FLAT_CONFIG=false if set. Verify eslint . works.

eslint . runs without errors. All rules produce same warnings as before.

What this migration involves

Moving from ESLint .eslintrc to ESLint flat config (eslint.config.js) is rated medium and takes about 2-4h on a typical project. The guide breaks it into 5 steps, 2 of which ship with runnable commands and 1 with a verification check.

FAQ

How long does migrating from ESLint .eslintrc to ESLint flat config (eslint.config.js) take?

Around 2-4h for a typical project — 5 steps, difficulty rated medium, 2 of them with copy-paste commands.

Is moving from ESLint .eslintrc to ESLint flat config (eslint.config.js) reversible?

No reverse guide is tracked yet, so treat this as a one-way move and keep a full export of your ESLint .eslintrc data before you start.

What does ESLint flat config (eslint.config.js) cost compared to ESLint .eslintrc?

Pricing for both tools is contact-based or not tracked yet.