[No QA] Fix latent lint errors that only surface on an uncached lint - #98943
Merged
Conversation
These are on main today, but the ESLint cache means most PRs never re-lint the files that carry them. Any PR touching config/eslint/ does, because the cache key hashes that directory, and then fails on errors it did not introduce. Three of the redundant casts date from f2d5991, which gave getCardFeedWithDomainID overloads that already return CompanyCardFeedWithDomainID. TypeScript now considers the assertions no-ops, so removing them changes nothing at runtime, and the fourth followed the same value through to an Onyx write. CommonActions.navigate's object form is deprecated. This call passes only name and params, with no key or merge, so the positional form dispatches the same action.
melvin-bot
Bot
requested review from
flaviadefaria and
stitesExpensify
and removed request for
a team
August 19, 2026 04:07
|
@stitesExpensify 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✅ Changes either increased or maintained existing code coverage, great job!
|
MonilBhavsar
approved these changes
Aug 19, 2026
Contributor
|
🚧 roryabraham has triggered a test Expensify/App build. You can view the workflow run here. |
Contributor
|
✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release. |
Contributor
|
🧪🧪 Use the links below to test this adhoc build on Android, iOS, and Web. Happy testing! 🧪🧪
|
roryabraham
added a commit
that referenced
this pull request
Aug 19, 2026
These recorded five violations that #98943 has since fixed at the source, so the entries describe casts and a deprecated call that no longer exist.
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
Five ESLint errors that already exist on
mainbut that most PRs never see.The ESLint cache key hashes
config/eslint/**, so a PR that touches that directory gets a cold, whole-repo re-lint instead of only its changed files — and then fails on errors it did not introduce. #97199 hit exactly this while adding anevalsproject to the ESLint config. Splitting the fix out so it can land on its own.They aren't caught by
eslint-seatbeltbecause the baseline lists these files under@typescript-eslint/no-unsafe-type-assertion, while the errors areno-unnecessary-type-assertionandno-deprecated— different rules, so nothing grandfathers them.Four redundant type assertions.
f2d5991a487gavegetCardFeedWithDomainIDoverloads that already returnCompanyCardFeedWithDomainID, soas CompanyCardFeedWithDomainIDbecame a no-op at three call sites, plus a fourth that carried the same value through to an Onyx write. TypeScript reports these as assertions that don't change the type, so removing them changes nothing at runtime or in the type system. One type import became unused and is dropped with them.One deprecated navigation call.
CommonActions.navigate's object form is deprecated in favour ofnavigate(name, params, options). The call inlinkTopasses onlynameandparams— nokey, nomerge— so the positional form dispatches an identical action. It is the onlyCommonActions.navigate(call insrc/.Fixed Issues
$
PROPOSAL:
Tests
npm run lintcompletes without these five errors. To see them onmain, a cached run won't do it —bun scripts/lint.ts --no-cache src/libs/Navigation/helpers/linkTo/index.ts src/libs/actions/CompanyCards.ts src/pages/workspace/companyCards/WorkspaceCompanyCardFeedSelectorPage.tsx src/pages/workspace/companyCards/addNew/CardInstructionsStep.tsxreports all five before this change and none after.npm run typecheckpasses. This is the meaningful check on the cast removals: if any assertion had been doing real work, dropping it would fail here.npx jest tests/navigation tests/unit/Navigationpasses (1007 tests, 65 suites), covering thelinkTochange.Offline tests
None — no runtime behaviour changes.
QA Steps
None. No user-facing change: four removed no-op type assertions and one deprecated API call swapped for its non-deprecated equivalent.
Screenshots/Videos
n/a