feat: add Expo and React Native framework detection and enable RN-specific rules#64
Merged
aidenybai merged 1 commit intomillionco:mainfrom Feb 21, 2026
Conversation
…cific rules React Native/Expo projects were detected as "unknown" framework, and the 8 existing rn-* lint rules were never enabled in the oxlint config. This change: - Adds "expo" and "react-native" as recognized Framework types - Detects expo/react-native packages in dependency detection - Conditionally enables all 8 rn-* rules when framework is Expo or React Native - Adds "React Native" category mapping and help text for all rn-* rules
|
@athul-binu is attempting to deploy a commit to the Million Team on Vercel. A member of the Team first needs to authorize it. |
Member
|
good catch, ty |
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
React Native and Expo projects are currently detected as
"unknown"framework (displayed as just "React"), and the 8 existingrn-*lint rules in the plugin are never enabled in the oxlint config — they're effectively dead code.This PR:
"expo"and"react-native"as recognizedFrameworktypes intypes.tsexpoandreact-nativepackages inFRAMEWORK_PACKAGESduring project discovery, so the CLI correctly displays "Expo" or "React Native" instead of "React"rn-*rules when framework is Expo or React Native (same pattern asNEXTJS_RULES):rn-no-raw-text(error) — raw text outside<Text>crashes on RNrn-no-deprecated-modules(error) — removed modules from react-native corern-no-legacy-expo-packages(warn) — deprecated Expo packagesrn-no-dimensions-get(warn) — non-reactive dimension APIrn-no-inline-flatlist-renderitem(warn) — perf issue with inline renderItemrn-no-legacy-shadow-styles(warn) — legacy shadow props vs boxShadowrn-prefer-reanimated(warn) — UI-thread animations over JS-threadrn-no-single-element-style-array(warn) — unnecessary array allocationrn-*rules in diagnostic outputrn-*ruleBefore
After (tested on a real Expo project)
Test plan
pnpm buildsucceedspnpm test)NEXTJS_RULESapproach)