Skip to content

Combined critique #56: root base tsconfig, dedup compiler policy - #857

Merged
Noisemaker111 merged 1 commit into
mainfrom
claude/critique-56-base-tsconfig
Jul 16, 2026
Merged

Noisemaker111 merged 1 commit into
mainfrom
claude/critique-56-base-tsconfig

Conversation

@Noisemaker111

Copy link
Copy Markdown
Owner

What

New tsconfig.base.json at repo root holding the shared compiler policy (target/module/moduleResolution/strict/skipLibCheck/isolatedModules/verbatimModuleSyntax/noEmit). Extended by the 3 leaf tsconfigs with no paths mapping: apps/web, examples/tanstack-host, packages/jgengine.

Why only 3 of 29 leaf configs

Verified with an isolated repro that Bun 1.3.11's test runner does not apply tsconfig paths through extends unless baseUrl is also declared in the same file — a known, open upstream bug (oven-sh/bun#23695). But tsgo (this repo's mandated compiler, @typescript/native-preview) has fully removed baseUrl support (TS5102: Option 'baseUrl' has been removed), unconditionally, anywhere in the resolved extends chain.

Those two constraints are mutually exclusive for any file both bun test and tsgo read. The other 26 leaf tsconfigs (every package/game/app that declares a @jgengine/* deep-import paths map) therefore keep their duplicated compiler flags exactly as before — extending the base there would silently break bun test deep-import resolution while check-types stays green (that's the trap).

Drift reconciliation

All 29 leaf configs already agreed 100% on target/module/moduleResolution/strict/skipLibCheck/isolatedModules — no actual conflicting values, just repetition.

  • verbatimModuleSyntax was previously absent only from examples/next-host and examples/studios (they use esModuleInterop instead) — left untouched since they can't safely extend the base.
  • noUnusedLocals/noUnusedParameters/noFallthroughCasesInSwitch are pre-existing per-package opt-ins (10 Games/* + convex/react/shell/next-host/studios lack them). Tested forcing these on everywhere via the base — it broke 4 workspaces with TS6133 unused-local errors, so left as-is rather than loosen the gate or force an unrelated cleanup into this PR.

Gate

  • bun install — clean
  • bun run build — clean
  • bun scripts/check-types-all.ts29/29 passing (baseline, unchanged)
  • bun run test:all4503 pass / 0 fail (baseline, unchanged) — explicitly re-verified the two @jgengine/* deep-import test files that broke under a naive full extraction (apps/dev/src/demo/behaviourRegisterDemo.test.ts, Games/starhome/src/game/starhome.world.test.ts) now pass

No stray files — diff is tsconfig.base.json + the 3 leaf tsconfigs only.


Generated by Claude Code

Extract shared compiler policy (target/module/moduleResolution/strict/
skipLibCheck/isolatedModules/verbatimModuleSyntax/noEmit) into
tsconfig.base.json, extended by the 3 leaf tsconfigs with no `paths`
mapping (apps/web, examples/tanstack-host, packages/jgengine).

Verified via isolated repro that Bun 1.3.11's test runner does not
apply tsconfig `paths` through `extends` unless `baseUrl` is also set
in the same file (oven-sh/bun#23695, open upstream bug) — and tsgo
(this repo's mandated compiler) has removed `baseUrl` support entirely
(TS5102), making the two requirements mutually exclusive. The other 26
leaf tsconfigs (every package/game/app with a `paths` map) therefore
keep their duplicated compiler flags as-is rather than risk breaking
`bun test` deep-import resolution.

No drift reconciliation beyond the 3 deduped configs: all leaf configs
already agreed on target/module/moduleResolution/strict/skipLibCheck/
isolatedModules (100% consistent). verbatimModuleSyntax was previously
absent only from examples/next-host and examples/studios (esModuleInterop
used instead); left untouched since they can't safely extend the base.
noUnusedLocals/noUnusedParameters/noFallthroughCasesInSwitch were
already package-specific opt-ins (10 Games + convex/react/shell/
next-host/studios lack them) — tested forcing these on everywhere and
it broke 4 workspaces (unused-local errors), so left as pre-existing
per-package strictness, not moved to base.
@vercel

vercel Bot commented Jul 16, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
jgengine-web Ready Ready Preview, Comment Jul 16, 2026 1:39pm

@Noisemaker111
Noisemaker111 merged commit bef9952 into main Jul 16, 2026
8 checks passed
@Noisemaker111
Noisemaker111 deleted the claude/critique-56-base-tsconfig branch July 16, 2026 13:51
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.

2 participants