Skip to content

eslint-config: upgrade eslint and @eslint/js to 10 - #1066

Closed
Aymericr wants to merge 1 commit into
mainfrom
cursor/deps-eslint-10-6cd4
Closed

Aymericr wants to merge 1 commit into
mainfrom
cursor/deps-eslint-10-6cd4

Conversation

@Aymericr

Copy link
Copy Markdown
Contributor

What does this PR do?

Upgrades eslint from ^9.39.1 to ^10.12.0 (in packages/eslint-config and packages/ui) and @eslint/js from ^9.39.1 to ^10.0.1. Major upgrade, so no auto-merge.

Breaking changes (v10.0.0)

  • Requires Node ^20.19.0 || ^22.13.0 || >=24.
  • eslintrc support is removed entirely (we already use flat config), and eslint-env comments are now reported as errors.
  • Deprecated rule-context methods are removed (context.getFilename(), getSourceCode(), getScope() and others), as are deprecated SourceCode methods.
  • eslint:recommended is updated, configs gain a name, JSX reference tracking is on, and no-shadow-restricted-names reports globalThis.
  • minimatch moves to v10, and jiti below 2.2 is no longer supported.

Code changes

  • eslint-plugin-react 7.37.5 is the latest release, and its settings.react.version: 'detect' path calls context.getFilename(). That crashed every lint run with contextOrFilename.getFilename is not a function. react-internal.js and next.js now pin version: '19.3' (the repo pins React 19.3.0), with a one-line comment explaining why. When React is bumped, this setting has to be bumped too, until eslint-plugin-react supports ESLint 10.
  • The peer ranges of typescript-eslint, eslint-plugin-react-hooks 5, eslint-plugin-turbo, eslint-config-prettier and @next/eslint-plugin-next already accept ESLint 10.

How to test

  1. bun install
  2. cd packages/ui && bun run lint. It should report no errors (on this branch's base it crashes without the version pin).
  3. bun run ci. ESLint isn't part of CI, so this only guards the lockfile.

Screenshots / screen recording

N/A — non-visual change

Checklist

  • I've tested this locally with bun dev
  • My code follows the existing code style (run bun check to verify)
  • I've updated relevant documentation (if applicable)
  • This PR targets the main branch

Local results: packages/ui lint is clean. I also ran the react-internal config over 24 editor components as a smoke test: every rule ran without crashing, with 1 ordinary warning. bun run ci steps pass, with only the local-only test failures that main also has.

Open in Web Open in Cursor 

eslint-plugin-react's React version detection calls context.getFilename(),
which ESLint 10 removed, so the shared configs pin the version instead of
'detect'.
@Aymericr

Copy link
Copy Markdown
Contributor Author

Landed in #1071 (dc65ba0), which combined the nine major upgrades with one lockfile. Closing as superseded. #1061 stays open.

@Aymericr Aymericr closed this Oct 15, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants