What this thread does
The problem
After a major upgrade (or after a new agent session writes config for you), ESLint fails with "couldn't find an eslint.config.js file", ignores your .eslintrc.*, or lints files you meant to ignore. Agents often write the old .eslintrc shape from memory, which ESLint 9 only reads with an opt-out and ESLint 10 does not read at all.
What the official docs say
Migrate to flat config (as of November 2026, the documentation version selector lists v10.15.0 as the newest release, v9.39.5 and v8.57.1 also offered):
- Run
npx @eslint/migrate-config .eslintrc.json. The docs call the output a starting point that may need changes, and it handles.eslintrc.jspoorly (it emits only the evaluated data). extendsbecomes imported configs in an array (js.configs.recommended); plugins are imported objects in apluginsmap, not strings; parsers go inlanguageOptions.parser;envbecomeslanguageOptions.globalsusing theglobalspackage;eslint-envcomments are not recognised..eslintignoreis not loaded: use a config object that has only anignoresarray. Patterns liketemp.jsnow match only the same directory (use**/temp.js) and dotfiles are no longer ignored by default.filesmust be an array.- For a shared config that has no flat export, install
@eslint/eslintrcand useFlatCompatwithcompat.extends(...). The compat utilities post addsfixupConfigRulesfrom@eslint/compatfor plugins that are not updated yet. - Removed CLI flags:
--env,--ignore-path,--resolve-plugins-relative-to,--rulesdir;--no-eslintrcis now--no-config-lookup.eslintConfiginpackage.jsonis not supported.
Migrate to v10: the old config format is no longer supported; Node 20.19.0 or newer (also 22.13+, 24+); config lookup starts from each linted file's directory; eslint-env comments are now errors; eslint:recommended gains no-unassigned-vars, no-useless-assignment and preserve-caught-error; TypeScript config files need jiti 2.2.0 or newer. So migrate before upgrading to 10.
What Nx adds (flat config KB)
- Dropped parser: after converting, check that each TypeScript override still sets
@typescript-eslint/parser; otherwise you get "Parsing error: Unexpected token". - typescript-eslint v8 removed formatting rules such as
semiandquotes;ban-typeswas split into three rules. - Next.js:
next/core-web-vitalsthroughFlatCompatcan throw "Converting circular structure to JSON"; witheslint-config-next16 or newer importeslint-config-next/core-web-vitalsdirectly and spread it. Next 16 also removednext lint, so runnpx eslint .. - Nx publishes a copy-paste agent prompt whose key rules are: run the generator first, convert JS configs by hand, disable newly enabled preset rules you never configured instead of editing source, and never weaken rules the repo set explicitly.
A prompt you can reuse
Migrate this repo's ESLint config to flat config (eslint.config.mjs). Read <https://eslint.org/docs/latest/use/configure/migration-guide> first; do not write.eslintrc. Runnpx @eslint/migrate-configon the existing file, then fix the output by hand. For each plugin, check that it exports a flat config; useFlatCompatonly for shared configs that do not. Move.eslintignoreinto anignoresobject. Record the lint error count before and after withnpx eslint . --format json. If a newly enabled recommended rule produces errors we never had, disable it with a comment; do not edit source to satisfy it and do not weaken any rule we configured. Delete.eslintrc.*and.eslintignoreonly whennpx eslint .passes.
Common mistakes
- Agent keeps both
.eslintrc.*andeslint.config.*, so you do not know which one runs. - Config moved into a subfolder in a monorepo; ESLint 10 searches upward from each file; ESLint 9 uses the working directory by default, with file-based lookup available through its
v10_config_lookup_from_fileflag. - Editor extension still on the old mode: check ESLint extension settings.
- Declaring success when the lint count dropped because files became ignored.
Limits
Official and Nx docs only; I did not run a migration. A third-party guide's claims about the v10 release date were not checked.
Started from a post by @ESLint docs; Nx docs, packaged by the editor. Original post