Skip to content

build(audit-engine): typecheck package tests #1859 - #1861

Merged
nc9 merged 1 commit into
mainfrom
boat/typecheck-tests-engine-rules-1859
Nov 14, 2026
Merged

nc9 merged 1 commit into
mainfrom
boat/typecheck-tests-engine-rules-1859

Conversation

@nc9

@nc9 nc9 commented Nov 14, 2026

Copy link
Copy Markdown
Contributor

Part of #1859

Scope: audit-engine only. Typechecking its tests surfaced 266 errors (over the ~150 threshold), so rules (1 error: @types/bun not installed for the bun types entry) is left for a follow-up PR.

Change

  • packages/audit-engine/tsconfig.json: include tests/**/*.ts, add "jsx": "react-jsx" (tests now pull in packages/report/src/output/html.tsx, which raised TS6142 otherwise). bun types and @types/bun were already present.
  • 74 test files fixed with type-only edits. No assertion or expected value changed (only ! / casts on the actual-value side).

Errors fixed (266 to 0)

TS2322 x102 (rule meta category widened to string, now as const), TS2740 x51 (crawler.storage cast to SQLiteStorage), TS2345 x32, TS2305 x11 (imports from the right packages), TS7022/7023 x16 (circular Bun.serve inference annotated), TS2352 x10, TS18047/18048 x16 (overall is number | null, !), TS2783 x6, TS2739 x6, and a handful of others (TS2353, TS2339, TS2769, TS2741, TS2554, TS2459, TS1117, TS6142). Partial fixtures use as unknown as T.

ts-expect-error (2)

  • tests/template-signature-coverage-1373.test.ts: }, 30_000); is a third argument to describe(), which the types have no slot for. Left as is with @ts-expect-error (no behaviour-preserving move).
  • tests/item-sources-publish-837.test.ts: fixture field description not in CappableRuleMeta, kept unchanged.

Timeout moves

None.

Gates

  • bun run typecheck in packages/audit-engine: 0 errors.
  • The 73 touched test files: 770 pass, 2 skip, 0 fail (run as one invocation, not batched by 5).

Agent skill: no change

@nc9
nc9 marked this pull request as ready for review November 14, 2026 14:52
@nc9
nc9 merged commit a98c0c7 into main Nov 14, 2026
16 checks passed
@nc9
nc9 deleted the boat/typecheck-tests-engine-rules-1859 branch November 14, 2026 15:11
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