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.