Conversation
…seOnyx 3rd argument Adds a local ESLint rule that forbids passing the deprecated 3rd `dependencies` argument to useOnyx(). React Compiler now memoizes selectors, so the manual dep list is redundant. Existing call sites are grandfathered via eslint-seatbelt (77 files) and will be migrated in follow-up batch PRs; new usages are blocked. Part of Expensify#94595 Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
|
@hoangzinh Please copy/paste the Reviewer Checklist from here into a new comment on this PR and complete it. If you have the K2 extension, you can simply click: [this button] |
Codecov Report✅ All modified and coverable lines are covered by tests. |
Reviewer Checklist
Screenshots/Videos
|
|
@fabioh8010 can you resolve conflicts, please? Might be |
# Conflicts: # config/eslint/eslint.seatbelt.tsv # cspell.json
… casing Addresses review feedback: use camelCase `useOnyx` (like `no-inline-useOnyx-selector`). This also drops the `useonyx` cspell entry, since the camelCase name splits into already-known tokens. Re-seeded the eslint-seatbelt baseline under the new rule name. Part of Expensify#95573 Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
|
@hoangzinh back to you! |
|
🚧 mountiny 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! 🧪🧪
|
|
✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release. |
|
🚀 Deployed to staging by https://github.com/mountiny in version: 9.4.34-0 🚀
|
|
🚀 Deployed to production by https://github.com/roryabraham in version: 9.4.34-14 🚀
|
|
🚀 Deployed to production by https://github.com/roryabraham in version: 9.4.34-14 🚀
Bundle Size Analysis (Sentry): |


Explanation of Change
Part of the
useOnyxdependencies-argument removal (#94595), PR 1 of the split.Adds a local ESLint rule
rulesdir/no-useonyx-dependencies-argthat forbids passing the deprecated 3rddependenciesargument touseOnyx(). React Compiler now memoizes selectors, so the manual dependency list is redundant (and unvalidatable byreact-hooks/exhaustive-deps). Existing call sites are grandfathered viaeslint-seatbelt(77 files) and will be migrated in the follow-up batch PRs; new 3-arg usages are blocked in CI. Tooling-only change — no runtime/behavior change.eslint-plugin-local-rules/no-useonyx-dependencies-arg.jsconfig/eslint/eslint.config.mjs→'rulesdir/no-useonyx-dependencies-arg': 'error'config/eslint/eslint.seatbelt.tsv(77 grandfathered entries)Fixed Issues
$ #95573
PROPOSAL: N/A
Tests
npm run lint→ passes. Existing 3-arguseOnyxcall sites are grandfathered by seatbelt (reported as "tend the garden" warnings, not errors).const [x] = useOnyx(ONYXKEYS.SESSION, {selector: (v) => v}, ['dep']);to anysrcfile, runnpm run lint-changedon it → it fails withrulesdir/no-useonyx-dependencies-arg. Remove the throwaway line.config/eslint/eslint.seatbelt.tsvcontains entries forrulesdir/no-useonyx-dependencies-arg(count > 0).Offline tests
N/A
QA Steps
N/A — ESLint tooling-only change, validated by CI lint. No user-facing surface.
PR Author Checklist
### Fixed Issuessection aboveTestssectionOffline stepssectionQA stepssectiontoggleReportand notonIconClick)Avatar, 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.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
Android: mWeb Chrome
iOS: Native
iOS: mWeb Safari
MacOS: Chrome / Safari