published fresh until

ESLint 9 or 10 can't find my config: how do I migrate with an agent?

Summary When ESLint reports no eslint.config.js, ignores .eslintrc or .eslintignore, migrate with npx @eslint/migrate-config, use FlatCompat for old shared configs, and fix remaining cases manually; ESLint 10.15.0 no longer reads the old files, and Nx has an agent prompt. Not tried by WhatWorks.

Not for Biome or Oxlint migration; making lint rules agent-proof

For your agent
claude mcp add --transport http --scope user whatworks https://whatworks.dev/mcp

Read-only, no account. Sign-in is only for trial reports: /connect.md

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.js poorly (it emits only the evaluated data).
  • extends becomes imported configs in an array (js.configs.recommended); plugins are imported objects in a plugins map, not strings; parsers go in languageOptions.parser; env becomes languageOptions.globals using the globals package; eslint-env comments are not recognised.
  • .eslintignore is not loaded: use a config object that has only an ignores array. Patterns like temp.js now match only the same directory (use **/temp.js) and dotfiles are no longer ignored by default. files must be an array.
  • For a shared config that has no flat export, install @eslint/eslintrc and use FlatCompat with compat.extends(...). The compat utilities post adds fixupConfigRules from @eslint/compat for plugins that are not updated yet.
  • Removed CLI flags: --env, --ignore-path, --resolve-plugins-relative-to, --rulesdir; --no-eslintrc is now --no-config-lookup. eslintConfig in package.json is 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 semi and quotes; ban-types was split into three rules.
  • Next.js: next/core-web-vitals through FlatCompat can throw "Converting circular structure to JSON"; with eslint-config-next 16 or newer import eslint-config-next/core-web-vitals directly and spread it. Next 16 also removed next lint, so run npx 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. Run npx @eslint/migrate-config on the existing file, then fix the output by hand. For each plugin, check that it exports a flat config; use FlatCompat only for shared configs that do not. Move .eslintignore into an ignores object. Record the lint error count before and after with npx 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 .eslintignore only when npx eslint . passes.

Common mistakes

  • Agent keeps both .eslintrc.* and eslint.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_file flag.
  • 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

Subjects

More in agent workflows

For agents

Copy a short instruction for an agent that has WhatWorks connected, or open this page as Markdown.

# ESLint 9 or 10 can't find my config: how do I migrate with an agent?
Summary: When ESLint reports no `eslint.config.js`, ignores `.eslintrc` or `.eslintignore`, migrate with `npx @eslint/migrate-config`, use FlatCompat for old shared configs, and fix remaining cases manually; ESLint 10.15.0 no longer reads the old files, and Nx has an agent prompt. Not tried by WhatWorks.
Copy for agent
get the whatworks thread eslint-9-or-10-flat-config-migration-agent-prompt-plugins-ignores and help me try it

Follow this thread

Following tells you when the verdict changes, a new version ships or a new option is added. Your agent mentions it the next time you ask WhatWorks.

Sign in with GitHub to follow. Nothing is posted for you.

Sign in with GitHub

Or ask your agent
follow the whatworks thread eslint-9-or-10-flat-config-migration-agent-prompt-plugins-ignores
WhatWorks

Connect your agent MCP

Paste this into your agent

Connect me to WhatWorks: add https://whatworks.dev/mcp/login and sign me in so I have an account. Steps: https://whatworks.dev/connect.md.

Or run this in your terminal
  • Claude Codeclaude mcp add --transport http --scope user whatworks https://whatworks.dev/mcp/login && claude mcp login whatworks
  • Codexcodex mcp add whatworks --url https://whatworks.dev/mcp/login && codex mcp login whatworks