fix(types): clear 110 of the 280 tsc errors blocking CI - #543
Merged
Conversation
CI has been red on main for every recent push because `pnpm run lint` exits 1 on 4 errors (the 254 warnings are non-blocking). Nothing after the Lint step has been running as a result. - components/mobile/MobileFooter.tsx: the file was committed with every quote character stripped, so the leading backtick opened a template literal that never closed and the whole file failed to parse. Restored the string quoting; no behaviour change intended. - app/page.tsx: <KineticExplorer /> was rendered without being imported (react/jsx-no-undef). Added the missing import. - hooks/useDriverReputation.ts: the effect called setState synchronously (react-hooks/set-state-in-effect). The settled result now carries the driverId it belongs to, so loading is derived rather than written back into state from the effect. - hooks/useTheme.ts: updateTheme was read by an effect declared above it (react-hooks/immutability). Hoisted it into a useCallback keyed on userId and added it to the effect deps. Lint now reports 0 errors. Type-check still fails on 280 pre-existing errors across 44 files, which is out of scope here.
Second step after the lint fix. `pnpm run type-check` reported 280 errors; this brings it to 170. Every fix here is mechanical — no production behaviour changes. - tsconfig.json: exclude `cypress`. The two specs under cypress/e2e are orphaned — Cypress is not a dependency, there is no cypress.config, and jest's testMatch does not pick them up — so `cy` was unresolvable and produced 63 errors on files nothing can run. - types/delivery.ts: import DeliveryStatus from ./filters, where it is actually declared. - PaymentLock.test.tsx: DEFAULT_HOOK_STATE was `as const`, so its literal types made Partial<typeof ...> reject every override. Typed it as CurrencyConversionResult instead (26 errors). - imageCompressionService.test.ts: browser-image-compression resolves a File, not a Blob; the mock helper now builds a File (10 errors). - proofService.test.ts: imageCompression is a function, so it needs jest.MockedFunction, not jest.Mocked, to expose mockResolvedValue. - trackingService.test.ts: isAxiosError is a type guard; stub it through mockImplementation rather than assigning over the declared signature. - feeService.test.ts, csvExport.test.ts: strict-mode indexing of jest mock.calls tuples. Affected suites all pass (87 tests across the 5 touched test files). Remaining 170 errors are NOT mechanical and are deliberately left alone: ~73 from walletService missing getTransactionStatus / connect / disconnect / getBalance / getPendingMultiSigOperations, which shipped hooks already call; ~45 from services/escrowService.ts, which imports 'stellar-sdk' (not a dependency) and '@/lib/wallet' (does not exist); ~8 from two conflicting useTheme implementations; ~9 from test files importing modules that were never added. Each needs a product decision.
AdaBebe0
force-pushed
the
fix/type-errors-ci
branch
from
September 1, 2026 03:47
9fb0ecf to
e02ba26
Compare
This was referenced Sep 1, 2026
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.
What this does
pnpm run type-checkreports 280 errors. This brings it to 170. Every fix is mechanical — no production behaviour changes.tsconfig.json— excludecypressPaymentLock.test.tsx—as constmadePartial<typeof DEFAULT_HOOK_STATE>reject every override; typed asCurrencyConversionResultimageCompressionService.test.ts—browser-image-compressionresolves aFile, not aBlobproofService.test.ts—imageCompressionis a function, needsjest.MockedFunctionnotjest.MockedfeeService.test.ts,csvExport.test.ts— strict-mode indexing of jestmock.callstuplestrackingService.test.ts—isAxiosErroris a type guard; stub viamockImplementationtypes/delivery.ts— importDeliveryStatusfrom./filters, where it's declaredOn the Cypress exclusion: the two specs under
cypress/e2e/are orphaned. Cypress isn't inpackage.json, there's nocypress.config.*, and jest'stestMatchdoesn't pick up.cy.ts. Socywas unresolvable and 63 errors came from files nothing in the repo can actually run. If e2e is wanted, adding Cypress properly is its own PR.Verification
pnpm run lint→ 0 errorspnpm run type-check→ 170 errors (was 280)The remaining 170 are not cleanup
I stopped here deliberately. What's left needs product decisions, not mechanical fixes:
walletServiceis missing methods that shipped code already calls.getTransactionStatus,connect,disconnect,getBalance,getPendingMultiSigOperations.hooks/useTxTracker.tsandhooks/useMultiSigApprovals.tsare in the tree calling these today. Someone needs to decide what these do and which endpoints they hit.services/escrowService.tsis unfinished scaffolding. It importsstellar-sdk, which is not a dependency and has never been installed, and@/lib/wallet, which does not exist (the import comment literally reads "Assume a utility to get a connected wallet instance"). It also doesn't exportEscrowDetails, lacksopenDispute, and returns a shapeuseEscrowReleasedoesn't expect. Fixing this means adding a blockchain SDK and building a wallet lib.useThemeimplementations.hooks/useTheme.tsis hand-rolled against aThemeServiceclass that doesn't exist, whilehooks/__tests__/useTheme.test.tsandcomponents/ui/ThemeToggle.tsxexpect anext-themes-based hook withresolvedTheme/toggleTheme. Two PRs landed incompatible versions; someone has to pick one.@/components/FleetMap,@/components/DashboardMetrics,@/services/metricsService,mapbox-gl,../HandoffQR,../services/shipmentHandoffService.Happy to take any of these on once there's a decision on the intended behaviour.