Bump TypeScript to 7 7️⃣✅

Merged
WO
4mo ago
+254-34

Stacked on #105 — merge that first.

Now that oxlint has replaced ESLint, nothing pins the project to TypeScript 6 any more, so this is just the bump:

-    "typescript": "^6.0.3",
+    "typescript": "^7.0.2",

Next.js 16.3 shells out to the project-local tsc instead of loading the TypeScript compiler API, so next build picks this up automatically. Its type check drops from 3.1s to ~0.6s.

What else is here

  • pnpm test:types → NODE_ENV=development next typegen && tsc --noEmit, plus a Type Checking CI job alongside Formatting / Linting / Tests. The typegen step generates .next/types (route types, root params, cache-life) that tsconfig.json already includes; NODE_ENV=development is what lets env.ts fall back to its dev default for INTERNAL_API_SECRET instead of demanding a real one. This gives a fast standalone signal in CI that doesn't wait on a full build.
  • Stopped tracking next-env.d.ts. It's already in .gitignore (line 38) but was tracked anyway, and it flip-flopped between import "./.next/dev/types/routes.d.ts" (after next dev) and import "./.next/types/routes.d.ts" (after next build/typegen) on basically every command.

Standalone tsc --noEmit: 2.49s → 0.43s.

History

Earlier revisions of this PR carried a workaround — TypeScript 7 installed under a typescript-7 alias, invoked by path, with the root left on 6 — because typescript-eslint reads ts.ModuleKind.Cjs at module load and TS 7's JS shim doesn't expose it, so eslint . died before parsing a single file. That's gone now; #105 removed the constraint entirely. The intermediate commits are kept for the record.

Verification

pnpm test:types, pnpm lint, pnpm test (211 passing), pnpm test:format, and pnpm build all pass on TypeScript 7.0.2.

🤖 Generated with Claude Code