Repository navigation
chore: Fix more lint warnings - #3770
Conversation
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
🔵 Tier 2 — Low RiskSmall, isolated change with no API route or data model modifications. Why this tier:
Additional context: spans packages but only 8 prod lines — under the 100-line cross-layer bar Review process: AI review + quick human skim (target: 5–15 min). Reviewer validates AI assessment and checks for domain-specific concerns. Stats
|
Duplicate code analysisNo new duplicate code introduced by this PR. jscpd compared this branch against |
| overrides: Partial<ExternalDashboardFilterWithId> = {}, | ||
| ): ExternalDashboardFilterWithId { | ||
| return { | ||
| return fromAny({ |
There was a problem hiding this comment.
🟡 P2 — fromAny replaces a checked single as T cast, so fixture typos no longer fail to compile
The old {...} as ExternalDashboardFilterWithId still made TypeScript check that the object overlaps the type: a misspelled type: 'QUERY_EXPRES' or a wrong whereLanguage literal would not compile. fromAny accepts any shape at all. The same file's staticFilter already shows a fix that needs no cast: type overrides as Partial<Extract<ExternalDashboardFilterWithId, { type: 'QUERY_EXPRESSION' }>> and return the literal directly. The same downgrade from as T to fromAny happens in makeSqlTile (validation.test.ts:68) and makeRule (ColorRulesEditor.test.tsx:12), where the comment explaining why the cast was safe was also deleted.
Advisory. Fix if it is a small defect in code this PR changes; otherwise reply in the thread. Do not widen the PR or touch files it did not already change. How to respond
PR Review
3 finding(s): 🔴 0 P0/P1 · 🟡 1 P2 · 🔵 2 P3 1 posted as inline comment(s) on the changed lines. 2 P3 folded at the bottom. 🔵 2 P3 — no action needed before merge
Priority comes from a separate grading pass over the finished review. P3 is folded here instead of posted inline. No finding blocks merge automatically; a maintainer decides. |
E2E Test Results✅ All tests passed • 473 passed • 1 skipped • 1120s
Tests ran across 4 shards in parallel. |
Deep Review✅ No critical issues found. This is a mechanical, test-only lint-warning cleanup. Across 42 files it replaces unsafe type assertions ( Three independent reviewers plus an orchestrator pass over the complete diff found no behavior-changing defect and no weakened test:
Verdict: Ready to merge. Reviewers (3): correctness, testing, kieran-typescript. Previous-comments lens assessed inline — the 2 prior comments are automated bot posts ( Notes (non-blocking, no action required): |
Summary
This PR fixes unsafe type warnings in test files using jest.mocked and shoehorn. The warning caps and ratchet baseline are reduced to the new counts.
Screenshots or video
No behavior changes.
References