[No QA] Create react-compiler-compat ESLint processor#82729
[No QA] Create react-compiler-compat ESLint processor#82729roryabraham merged 12 commits intomainfrom
Conversation
ESLint processor plugin that runs React Compiler on each file to determine if lint rules made redundant by automatic memoization should be suppressed. Initially targets `react/jsx-no-constructed-context-values`. Co-authored-by: Cursor <cursoragent@cursor.com>
Apply the processor to .tsx and .jsx files so that lint rules made redundant by React Compiler (e.g. react/jsx-no-constructed-context-values) are automatically suppressed for files that compile successfully. Co-authored-by: Cursor <cursoragent@cursor.com>
|
@heyjennahay no product considerations here, removing your review request. |
ESLint 9 requires processor objects to have a `meta` property with `name` and `version` for cache serialization to work. Co-authored-by: Cursor <cursoragent@cursor.com>
The plugin's .mjs source file isn't a lintable app source file and breaks type-checked rules that require a tsconfig project. Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
|
@chrispader @blimpich ready for review! |
|
@codex review |
|
Codex Review: Didn't find any major issues. 🎉 ℹ️ About Codex in GitHubCodex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback". |
Reviewer Checklist
Screenshots/VideosAndroid: HybridAppAndroid: mWeb ChromeiOS: HybridAppiOS: mWeb SafariMacOS: Chrome / Safari |
|
@blimpich resolved conflicts ✅ |
|
✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release. |
|
Sorry late to the party. LGTM too! |
|
🚧 @roryabraham has triggered a test Expensify/App build. You can view the workflow run here. |
|
🧪🧪 Use the links below to test this adhoc build on Android, iOS, and Web. Happy testing! 🧪🧪
|
|
🚀 Deployed to staging by https://github.com/roryabraham in version: 9.3.22-0 🚀
|
|
🚀 Deployed to production by https://github.com/mountiny in version: 9.3.22-4 🚀
|
|
🚀 Deployed to production by https://github.com/mountiny in version: 9.3.22-4 🚀
|
Explanation of Change
There are a number of lint rules that are incompatible with or don't make sense in files that are successfully compiled by React Compiler.
One such rule is
react/jsx-no-constructed-context-values, which warns:But if the file is compiled by React Compiler, then
useMemoisn't necessary because the context value will be automatically memoized.This PR creates a ESLint processor which:
Fixed Issues
(partial) #68765
Tests
None.
Offline tests
n/a
QA Steps
None.
PR Author Checklist
### Fixed Issuessection aboveTestssectionOffline stepssectionQA stepssectioncanBeMissingparam foruseOnyxtoggleReportand notonIconClick)src/languages/*files and using the translation methodSTYLE.md) were followedAvatar, I verified the components usingAvatarare working as expected)StyleUtils.getBackgroundAndBorderStyle(theme.componentBG))npm run compress-svg)Avataris modified, I verified thatAvataris working as expected in all cases)Designlabel and/or tagged@Expensify/designso the design team can review the changes.ScrollViewcomponent to make it scrollable when more elements are added to the page.mainbranch was merged into this PR after a review, I tested again and verified the outcome was still expected according to theTeststeps.Screenshots/Videos
lint.mov