Repository navigation
chore(deps): migrate to ESLint 10 - #42
Merged
Merged
Conversation
Drop @react-native/eslint-config (still peers eslint ^8 || ^9 and crashes with 'scopeManager.addGlobals is not a function') and inline its rule set into a native flat config using the underlying plugins directly. Supersedes #30.
This was referenced Nov 26, 2026
Merged
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.
Summary
Moves lint to ESLint 10 and supersedes #30.
@react-native/eslint-confighasn't caught up with ESLint 10. Its latest release (0.88.1) and the current nightly both still requireeslint ^8 || ^9, and on ESLint 10 it fails withscopeManager.addGlobals is not a function. This PR drops the preset and uses its plugins directly in a native flat config.Changes
eslint9 → 10.15,@eslint/compat1 → 2,eslint-plugin-prettier5.5.7 (the bumps from chore(deps-dev): bump the eslint group across 1 directory with 5 updates #30)@react-native/eslint-config,@eslint/eslintrc(FlatCompat) and the now-unused@eslint/jstypescript-eslint,eslint-plugin-react,eslint-plugin-react-hooks,eslint-plugin-react-native,@react-native/eslint-plugin,eslint-plugin-jest,@eslint-community/eslint-plugin-eslint-comments,globalseslint.config.mjs: copied in the RN preset's rules, globals and overrides. Left out the rules ESLint core has removed (valid-jsdoc,no-catch-shadow,no-native-reassign, the Node.js rules, and so on), and replacedno-new-objectwithno-object-constructor. Left out the Flow-only rules and@babel/eslint-parser, since the repo has no Flow sources. The strict TypeScript rules and the test overrides are unchanged.eslint-plugin-react,eslint-plugin-react-nativeand@react-native/eslint-pluginare wrapped withfixupPluginRules, because they don't declare ESLint 10 support yet.Test plan
yarn lintis clean on ESLint v10.15.0react-hooks/exhaustive-deps,no-var,eqeqeq,no-debugger,react/self-closing-compandreact-native/no-inline-styles, so the ported rules are running.yarn typecheckpassesyarn testpasses (231 tests)