Repository navigation
Conversation
eslint-plugin-react's React version detection calls context.getFilename(), which ESLint 10 removed, so the shared configs pin the version instead of 'detect'.
3 of 4 tasks
Contributor
Author
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What does this PR do?
Upgrades
eslintfrom ^9.39.1 to ^10.12.0 (inpackages/eslint-configandpackages/ui) and@eslint/jsfrom ^9.39.1 to ^10.0.1. Major upgrade, so no auto-merge.Breaking changes (v10.0.0)
^20.19.0 || ^22.13.0 || >=24.eslint-envcomments are now reported as errors.context.getFilename(),getSourceCode(),getScope()and others), as are deprecatedSourceCodemethods.eslint:recommendedis updated, configs gain aname, JSX reference tracking is on, andno-shadow-restricted-namesreportsglobalThis.Code changes
eslint-plugin-react7.37.5 is the latest release, and itssettings.react.version: 'detect'path callscontext.getFilename(). That crashed every lint run withcontextOrFilename.getFilename is not a function.react-internal.jsandnext.jsnow pinversion: '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.typescript-eslint,eslint-plugin-react-hooks5,eslint-plugin-turbo,eslint-config-prettierand@next/eslint-plugin-nextalready accept ESLint 10.How to test
bun installcd packages/ui && bun run lint. It should report no errors (on this branch's base it crashes without the version pin).bun run ci. ESLint isn't part of CI, so this only guards the lockfile.Screenshots / screen recording
N/A — non-visual change
Checklist
bun devbun checkto verify)mainbranchLocal results:
packages/uilint is clean. I also ran thereact-internalconfig over 24 editor components as a smoke test: every rule ran without crashing, with 1 ordinary warning.bun run cisteps pass, with only the local-only test failures thatmainalso has.