build(test-types): tsc-baseline gate for tsconfig.tests.json (PP-d8uq)#1584
Open
timothyfroehlich wants to merge 1 commit into
Open
build(test-types): tsc-baseline gate for tsconfig.tests.json (PP-d8uq)#1584timothyfroehlich wants to merge 1 commit into
timothyfroehlich wants to merge 1 commit into
Conversation
Test files have never been type-checked by tsc (the `typecheck` script runs `tsc -p tsconfig.json`, which excludes them; vitest strips types via esbuild). `tsc -p tsconfig.tests.json` surfaces 261 latent type errors. Establishes a regression gate so no NEW test type-errors creep in while the backlog is burned down (epic PP-38jq): - add `tsc-baseline` dev dep - `typecheck:tests` (tsc -p tsconfig.tests.json | tsc-baseline check), wired into `check`; fails only on errors not in the committed baseline - `typecheck:tests:save` to regenerate the baseline after fixing errors - commit `.tsc-baseline.json` (261 errors) and add it to `.prettierignore` so regenerates don't churn against prettier - drop `e2e/**` + `playwright.config.ts` from tsconfig.tests.json include — they belong to e2e/tsconfig.json's NodeNext scope and were mis-checked under bundler resolution (their own type-checking is orphaned: PP-0q8e) Verified: gate exits 1 on a newly-introduced test type error, 0 when clean; app typecheck unaffected. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
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
Test files have never been type-checked by
tsc—pnpm run typecheckrunstsc -p tsconfig.json, which excludes tests; vitest strips types via esbuild; ESLint usestsconfig.tests.jsonbut doesn't surface assignability errors. Runningtsc -p tsconfig.tests.jsonsurfaces 261 latent type errors.This PR establishes a regression gate (via
tsc-baseline) so no new test type-errors creep in while the backlog is burned down under epic PP-38jq. It does not fix the 261 errors (those are the child beads) and does not yet wire the editor (the deferred capstone, PP-4k76).Changes
tsc-baselinedev dependencytypecheck:tests=tsc --noEmit --pretty false -p tsconfig.tests.json | tsc-baseline check, wired intocheck; fails only on errors not in the committed baselinetypecheck:tests:saveto regenerate the baseline after fixing errors.tsc-baseline.json(261 errors) + add to.prettierignore(so regenerates don't churn against prettier)e2e/**+playwright.config.tsfromtsconfig.tests.jsoninclude — they belong toe2e/tsconfig.json's NodeNext scope and were mis-checked under bundler resolution (their own type-checking is orphaned → PP-0q8e)How an agent uses it
pnpm run check(orpnpm run typecheck:tests) now fails if you introduce a test type-error not already in the baseline. After fixing real errors, runpnpm run typecheck:tests:saveand commit the shrunken baseline.Verification
typecheckunaffectedFollow-up (epic PP-38jq, burndown by root cause)
PP-ku3l (DB seam ~78) · PP-pobu (factory id ~42) · PP-s4gt (mock typing ~48) · PP-qbnk (stale enums ~22) · PP-vcdl (ProseMirrorDoc ~21) · PP-tka5 (NODE_ENV ~10) · PP-pwrr (misc ~17) · PP-0q8e (e2e typecheck) · PP-4k76 (editor wiring capstone, blocked until cleanups land)
🤖 Generated with Claude Code