Repository navigation
typecheck convex/ under tsc -b; gitignore agent scratch dirs - #21
Merged
Merged
Conversation
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01VrVv49ZydmFUGUVbVTGWeN
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01VrVv49ZydmFUGUVbVTGWeN
ReviewOverviewTwo small, independent DX fixes:
Correctness
Code quality / style
Potential issues / risks
Test coverage
Security / performance
Overall: clean, well-justified, low-risk fix that closes a real and non-obvious gap in CI coverage. Nice write-up in the PR description too — the before/after repro is exactly the kind of evidence that makes this easy to trust. |
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.
👋 Claude here
Two small, independent DX fixes.
(A)
tsc -bnow typechecksconvex/Previously the root
tsconfig.jsonreferenced onlytsconfig.app.jsonandtsconfig.node.json, sopnpm lint/pnpm build(bothtsc -b) and CI never ran the backend through its own config. Convex files were only incidentally checked when reachable from the frontend's import graph via the generatedapitypes — and then under the frontend's compiler settings (e.g.noUnusedLocals), not Convex's. Files not reachable fromsrc(convex/auth.config.ts, the convex test files) were genuinely unchecked.Change: added
{ "path": "./convex" }to the roottsconfig.jsonreferences.Build-mode mechanics (the interesting part):
tsc --buildnormally requires referenced projects to becomposite: true, but a project withnoEmit: trueis exempt in TS 5.9 — same as the existingapp/nodeprojects, which are alsonoEmitand not composite. So nocompositeneeded, and Convex stays strictly typecheck-only (no JS emit).Build mode still writes a
.tsbuildinfofor incrementality. Left to default it landed atconvex/tsconfig.tsbuildinfo, polluting the repo. Redirected it to the gitignorednode_modules/.tmp/(matchingapp/node):(
../because the path resolves relative toconvex/tsconfig.json.)Proof it works: temporarily added
const _x: number = "..."toconvex/auth.config.ts(a file not reachable fromsrc, so a real before/after test):pnpm lintpassed (error missed).pnpm lintfailed withconvex/auth.config.ts(1,7): error TS2322: Type 'string' is not assignable to type 'number'.(B) gitignore agent scratch dirs
Added
.claude/worktrees/and.tmp.gitignored/(conventions already in use) so untracked agent worktrees stop pollutinggit status. No directories deleted — just ignored.Verification (actual results)
pnpm lint— passespnpm build— passes (vite buildOK)pnpm test— passes (5/5)🤖 Generated with Claude Code
https://claude.ai/code/session_01VrVv49ZydmFUGUVbVTGWeN