Unverified Commit f7545a47 authored by Aurora Scharff's avatar Aurora Scharff Committed by GitHub

docs: clarify ESLint 10 support (#100198)

## Summary

Document that `eslint-config-next@16.4.0` and later supports ESLint 10
with the default React version detection, so users can remove a
`settings.react.version` override added for the `context.getFilename`
error.

Align the Next.js 16 upgrade guide with the ESLint 9 minimum and the
ESLint 10 support boundary.

Finding: https://next-maintainer-agent.vercel.tools/agent-feedback/1854

## Verification

- `prettier --check docs/01-app/03-api-reference/05-config/03-eslint.mdx
docs/01-app/02-guides/upgrading/version-16.mdx`
- `git diff --check`
- `alex docs/01-app/03-api-reference/05-config/03-eslint.mdx
docs/01-app/02-guides/upgrading/version-16.mdx --quiet` (reported only
pre-existing warnings outside the changed lines)
- Not run: `pnpm lint` (docs-only change; targeted formatting and prose
checks run)

<!-- NEXT_JS_LLM -->
parent 58f4af6a
......@@ -1233,7 +1233,7 @@ The `unstable_rootParams` function has been removed. Use [`next/root-params`](/d
### Installation fails after upgrading ESLint
Next.js 16 removes `next lint`, but migrating to the ESLint CLI does not require upgrading ESLint. `eslint-config-next@16` requires ESLint 9; an existing compatible lint configuration can use an older version.
Next.js 16 removes `next lint`, but migrating to the ESLint CLI does not require upgrading ESLint. `eslint-config-next@16` requires ESLint 9 or later, and `eslint-config-next@16.4.0` or later supports ESLint 10. If your existing lint configuration does not use `eslint-config-next@16`, you can keep its compatible ESLint version.
- [ ] If an ESLint upgrade causes peer dependency conflicts, restore the previous compatible versions of `eslint`, `eslint-config-next`, and `@next/eslint-plugin-next` (if present), along with the previous lint configuration.
- [ ] If installation interrupted the upgrade, retry the same exact target with `--skip-eslint-upgrade` to preserve the repaired lint stack and skip the lint codemod. If Next.js already matches the target, install dependencies and complete interrupted migrations individually. Replace `next lint` scripts with ESLint CLI commands compatible with the preserved configuration. Confirm installation and lint pass.
......
......@@ -78,7 +78,11 @@ Get linting working quickly with the ESLint CLI (flat config):
bunx eslint .
```
> **Good to know**: `eslint-config-next` supports ESLint 9 and ESLint 10. ESLint 10 requires Node.js `^20.19.0`, `^22.13.0`, or `>=24`. Some of the plugins included in `eslint-config-next` don't list ESLint 10 in their peer dependencies yet, so your package manager may show peer dependency warnings, or fail when strict peer dependencies are enabled.
> **Good to know**:
>
> - `eslint-config-next` supports ESLint 9 and ESLint 10. ESLint 10 requires Node.js `^20.19.0`, `^22.13.0`, or `>=24`.
> - Starting with `eslint-config-next@16.4.0`, the default React version detection works with ESLint 10. You can remove a `settings.react.version` override added as a workaround for a `context.getFilename` error.
> - Some of the plugins included in `eslint-config-next` don't list ESLint 10 in their peer dependencies yet, so your package manager may show peer dependency warnings, or fail when strict peer dependencies are enabled.
## Reference
......@@ -384,4 +388,5 @@ When you spread `...nextConfig`, you're adding multiple config objects that incl
| Version | Changes |
| --------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `v16.4.0` | `eslint-config-next` added ESLint 10 compatibility, including support for default React version detection. |
| `v16.0.0` | `next lint` and the `eslint` next.config.js option were removed in favor of the ESLint CLI. A [codemod](/docs/app/guides/upgrading/codemods#migrate-from-next-lint-to-eslint-cli) is available to help you migrate. |
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment