Problem
Every PR that pulls in the latest main fails CI on two checks — typecheck and ESLint check — so nothing can merge and the backend deploy is blocked. The failures are identical across unrelated PRs (e.g. #84791, #92429), confirming the breakage is on main itself rather than in any one PR.
The shared error:
src/components/Search/SearchFiltersParticipantsSelector.tsx(72,81):
error TS2304: Cannot find name 'allPolicies'.
with the matching @typescript-eslint/no-unsafe-argument ESLint error at the same 72:81 location.
Reproduction Steps
These apply to CI on main (and any branch with main merged in).
- Branch from latest
main.
- Run
npm run typecheck (or npm run lint).
Expected Behavior: typecheck and ESLint pass.
Actual Behavior: both fail with Cannot find name 'allPolicies' / no-unsafe-argument at src/components/Search/SearchFiltersParticipantsSelector.tsx:72:81.
Solution
PR #92045 ("Stop scroll jump on search filter participant selection") removed the Onyx binding const [allPolicies] = useOnyx(ONYXKEYS.COLLECTION.POLICY); from SearchFiltersParticipantsSelector.tsx, but left the usage of allPolicies at line 72:
const expensifyTeamExclusions = getExpensifyTeamExclusions(personalDetails, allPolicies, currentUserEmail);
Re-add the allPolicies useOnyx binding alongside the component's other hooks. useOnyx and ONYXKEYS are already imported, so no other changes are needed.
Extra context
The sibling component src/components/Search/FilterComponents/UserSelector.tsx still has the correct pattern (const [policies] = useOnyx(ONYXKEYS.COLLECTION.POLICY); passed into the same getExpensifyTeamExclusions util), confirming the intended shape.
The ESLint no-unsafe-argument error is a downstream symptom: with allPolicies unresolved, TypeScript types it as any/error, which makes it an "unsafe argument". Restoring the binding fixes both errors at once.
– written by Claude on Ben's behalf
Problem
Every PR that pulls in the latest
mainfails CI on two checks —typecheckandESLint check— so nothing can merge and the backend deploy is blocked. The failures are identical across unrelated PRs (e.g. #84791, #92429), confirming the breakage is onmainitself rather than in any one PR.The shared error:
with the matching
@typescript-eslint/no-unsafe-argumentESLint error at the same72:81location.Reproduction Steps
These apply to CI on
main(and any branch withmainmerged in).main.npm run typecheck(ornpm run lint).Expected Behavior: typecheck and ESLint pass.
Actual Behavior: both fail with
Cannot find name 'allPolicies'/no-unsafe-argumentatsrc/components/Search/SearchFiltersParticipantsSelector.tsx:72:81.Solution
PR #92045 ("Stop scroll jump on search filter participant selection") removed the Onyx binding
const [allPolicies] = useOnyx(ONYXKEYS.COLLECTION.POLICY);fromSearchFiltersParticipantsSelector.tsx, but left the usage ofallPoliciesat line 72:Re-add the
allPoliciesuseOnyxbinding alongside the component's other hooks.useOnyxandONYXKEYSare already imported, so no other changes are needed.Extra context
The sibling component
src/components/Search/FilterComponents/UserSelector.tsxstill has the correct pattern (const [policies] = useOnyx(ONYXKEYS.COLLECTION.POLICY);passed into the samegetExpensifyTeamExclusionsutil), confirming the intended shape.The ESLint
no-unsafe-argumenterror is a downstream symptom: withallPoliciesunresolved, TypeScript types it asany/error, which makes it an "unsafe argument". Restoring the binding fixes both errors at once.– written by Claude on Ben's behalf