The fourth and final TypeScript-side ESLint warning bucket cleaned :
115 explicit `any` annotations replaced or suppressed across 57
files. 0 TS errors after the pass.
Distribution of fixes (per the agent's spot-check on the work) :
~50% replaced with `unknown` + downstream narrowing — the
structurally-safer default for data crossing a boundary
(catch blocks, JSON.parse output, postMessage, generic
reducer state).
~30% replaced with the concrete type — when an existing type
in src/types/ or src/services/generated/model/ matched
the value's actual shape.
~15% suppressed with vendor / structural justification — DOM
event factories, third-party callbacks whose .d.ts
upstream uses any, generic util types where a constraint
would balloon the signature.
~5% generic constraint refactor — `pluck<T extends Record<…>>`
style, where the original `any` was hiding a missing
generic.
One follow-up fix landed in this commit :
TrackSearchResults.stories.tsx imported Track from
features/player/types but the component expects Track from
features/tracks/types/track. The story's `as any` casts had
been hiding the divergence ; tightening the cast surfaced the
wrong import. Repointed to the right Track type ; both
Track-shaped objects in the fixture now satisfy the actual
prop type without needing a cast.
baseline post-commit : 803 warnings, 0 errors, 0 TS errors.
Remaining buckets :
754 no-restricted-syntax (design-system guardrail — unchanged)
49 react-hooks/exhaustive-deps (next target)
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>