Skip to content

chore(lint): prevent generic isRecord guards#1272

Draft
betegon wants to merge 1 commit into
mainfrom
bt/chore-no-generic-is-record
Draft

chore(lint): prevent generic isRecord guards#1272
betegon wants to merge 1 commit into
mainfrom
bt/chore-no-generic-is-record

Conversation

@betegon

@betegon betegon commented Jul 21, 2026

Copy link
Copy Markdown
Member

Summary

Prevents new generic isRecord type guards from being added under src/. The existing helpers now use local, shape-specific names so each call site states what runtime shape it actually needs.

Changes

  • add a Biome Grit plugin that flags function-valued isRecord declarations without blocking unrelated boolean variables
  • replace the three existing helpers with JSON-, wizard-, and Replay-specific guards
  • exercise the real Biome plugin and preserve Replay extraction behavior for valid and malformed payloads

Test Plan

  • pnpm run lint
  • pnpm exec tsc --noEmit
  • pnpm run check:deps
  • pnpm run check:errors
  • focused guard, alert, Replay, and wizard tests: 86 passed
  • pnpm run test:unit: 8,519 passed; 9 unrelated local failures remain (six timezone-sensitive assertions pass with TZ=UTC, two bash simulations require newer than macOS bash 3.2, and one existing self-hosted wizard test fails independently)

@github-actions

Copy link
Copy Markdown
Contributor
PR Preview Action v1.8.1

QR code for preview link

🚀 View preview at
https://cli.sentry.dev/_preview/pr-1272/

Built to branch gh-pages at 2026-07-21 09:34 UTC.
Preview will be ready when the GitHub Pages deployment is complete.

@github-actions

Copy link
Copy Markdown
Contributor

Codecov Results 📊

✅ Patch coverage is 93.75%. Project has 5501 uncovered lines.
❌ Project coverage is 81.65%. Comparing base (base) to head (head).

Files with missing lines (1)
File Patch % Lines
src/lib/formatters/replay.ts 92.00% ⚠️ 2 Missing and 2 partials
Coverage diff
@@            Coverage Diff             @@
##          main       #PR       +/-##
==========================================
- Coverage    81.69%    81.65%    -0.04%
==========================================
  Files          426       427        +1
  Lines        29909     29973       +64
  Branches     19433     19497       +64
==========================================
+ Hits         24431     24472       +41
- Misses        5478      5501       +23
- Partials      2035      2037        +2

Generated by Codecov Action

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant