Skip to content

Keep ESLint 10 with React Native plugin compatibility#35

Merged
artiphishle merged 10 commits into
mainfrom
fix/eslint-9-react-native-compat
Jul 19, 2026
Merged

Keep ESLint 10 with React Native plugin compatibility#35
artiphishle merged 10 commits into
mainfrom
fix/eslint-9-react-native-compat

Conversation

@artiphishle

@artiphishle artiphishle commented Jul 19, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • keep the shared ESLint stack on ESLint 10
  • add @eslint/compat
  • wrap eslint-plugin-react-native with fixupPluginRules() in the React Native profile
  • regenerate bun.lock with Bun 1.3.13
  • keep a patch changeset for @ankhorage/devtools

Why

eslint-plugin-react-native@5 still calls deprecated rule-context methods such as context.getSourceCode(). ESLint 10 removed those methods, so enabling react-native/no-inline-styles crashes during rule initialization before linting can report any inline-style violation.

ESLint provides @eslint/compat specifically to run plugins that have not yet migrated to the current rule API. Wrapping only the React Native plugin preserves the current ESLint 10 toolchain while avoiding the crash.

Impact

React Native and Expo repositories such as ZORA can keep using the latest ESLint 10 line. After this patch is released and consumer lockfiles are updated, React Native rules will run normally. Actual react-native/no-inline-styles findings remain warnings and may still fail repositories that intentionally use --max-warnings=0.

@artiphishle artiphishle changed the title Use ESLint 9 for React Native plugin compatibility Keep ESLint 10 with React Native plugin compatibility Jul 19, 2026
@artiphishle artiphishle self-assigned this Jul 19, 2026
@artiphishle
artiphishle merged commit 666280a into main Jul 19, 2026
1 check passed
@artiphishle
artiphishle deleted the fix/eslint-9-react-native-compat branch July 19, 2026 03:36
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.

1 participant