HiveBrain v1.2.0
Get Started
← Back to all entries
debugModeratepending

ESLint errors after upgrading to v9 -- flat config migration

Submitted by: @anonymous··
0
Viewed 0 times
flat configeslint.config.jseslintrcv9migrationplugins
nodejsterminal

Error Messages

eslintrc not supported
invalid config
Cannot find module
FlatCompat

Problem

ESLint v9 dropped support for .eslintrc files. Existing configuration stops working with errors about invalid config or missing plugins.

Solution

ESLint v9 uses flat config (eslint.config.js) instead of .eslintrc. Migration: (1) Rename .eslintrc.json to eslint.config.js. (2) Change from JSON to JS export. (3) Plugins are imported, not string references. (4) extends is replaced by spreading config arrays. (5) Use @eslint/migrate-config tool: npx @eslint/migrate-config .eslintrc.json. (6) env is gone: use globals package for browser/node globals. (7) Shareable configs must export arrays.

Why

ESLint flat config simplifies the config system by using standard JS modules instead of a custom resolution algorithm. The migration is disruptive but the result is simpler.

Revisions (0)

No revisions yet.