Repository navigation
Conversation
This branch has not been deployed
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.
Explanation of Change
Item 5 of the lint plan:
react-hooks/exhaustive-depsnow runs as oxlint's own Rust rule instead of ESLint's rule code hosted in an oxlint JS plugin (nativeRulesinoxlint.config.mts). oxlint 1.95 fixed the disable-comment bug (oxc#26277) that kept it hosted.config/oxlint/reactCompilerGate.mjs,config/reactCompiler/suppressedRules.mjs).ReactCompilerFilterinscripts/lint/already dropped those reports, so it is now the only place that does:react/jsx-no-constructed-context-values,rulesdir/no-inline-useOnyx-selector, and exhaustive-deps reports that a dependency "changes every render" (the native rule's wording)..currentin an effect cleanup for any ref read through an object, here the module-levelReportActionComposeFocusManagerrefs.eslint-plugin-react-hooksdoesn't report these.scripts/lint/lsp/oxlint.ts) now also drops the hint oxlint publishes for each label of a report (for example "handleris declared here") when the report itself was dropped, so no hint is left pointing at nothing.What changes for developers:
npm run lint, CI and the editor throughscripts/lint/lsp/oxlint.tsreport exactly what they did before. Plainnpx oxlint, or an editor running oxlint without the wrapper, now also shows the "memoize this" reports above in memoized files, because those reports are only filtered inscripts/lint/.contributingGuides/LINTING.mdalready says plain oxlint skips the React Compiler filter.Lint safety: with disable comments stripped, the native rule and the hosted rule report the same missing dependencies (211) and unstable dependencies (199). Full
npm run lintoutput matchesmain(3751 messages, only line shifts).Fixed Issues
$ #106151
PROPOSAL:
Tests
npm run lint. Verify it passes with no new errors.const handler = () => {};anduseEffect(() => handler(), [handler]);. Runnpm run lint -- <file>. Verify nothing is reported forhandler.useEffect(() => console.debug(foo), []);wherefoois a prop. Runnpm run lint -- <file>. Verifyreact-hooks/exhaustive-depsreports the missing dependencyfoo.bun test ./tests/tooling/lintPipeline.test.ts ./tests/tooling/lintLSPWrapper.test.ts. Verify all tests pass.Offline tests
N/A, lint tooling only.
QA Steps
[No QA]: lint tooling only, nothing changes in the app.
PR Author Checklist
### Fixed Issuessection aboveTestssectionOffline stepssectionQA stepssectionAvatar, I verified the components usingAvatarare working as expected)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.mainbranch was merged into this PR after a review, I tested again and verified the outcome was still expected according to theTeststeps.Screenshots/Videos
Android: Native
N/A, lint tooling only.
Android: mWeb Chrome
N/A, lint tooling only.
iOS: Native
N/A, lint tooling only.
iOS: mWeb Safari
N/A, lint tooling only.
MacOS: Chrome / Safari
N/A, lint tooling only.