Green up codebase: fix typecheck, lint, and test infra #1
Loading…
Reference in a new issue
No description provided.
Delete branch "chore/green-up-codebase"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Greens up the codebase so CI checks pass cleanly.
pnpm typecheckpnpm testruns green60 files changed, +675 / -531.
The recent dependency bump (drizzle-orm 0.45, TanStack Router/Start, better-auth 1.5, TypeScript 6) left the project failing every quality gate. With no `typecheck` script, ~30 type errors had accumulated unnoticed alongside 86 lint errors and a broken test runner. TypeScript (30 -> 0): - flights.ts: fix flightSelectShape params for drizzle 0.45 aliasedTable signature (root of most cascade errors) - auth-client.ts: add inferAdditionalFields so updateUser({ unitsPref }) typechecks; flip unitsPref to input:true so users can set it - signin.tsx: make redirect search param cleanly optional (fixes Link errors on landing/signup) - dashboard.ts: guard depLon/arrLon nulls - flights/$id + fleet/$tail: handle loaderData typing under `head` - misc unused imports, tz-lookup ambient types, recharts formatters Lint (86 -> 0): - auto-fix type-import style; remove redundant optional chains / conditions / assertions; drop dead guard in form.tsx; convert maplibre import() type annotations to erased top-level `import type` (runtime imports stay dynamic); ignore .output/.nitro Tests (broken -> 23 passing): - add vitest.config.ts (Node env, no SSR plugins) fixing the "module is not defined" crash - add src/lib/fr24-parser.test.ts covering all parser functions Tooling: - remove dead pnpm.onlyBuiltDependencies from package.json (now in pnpm-workspace.yaml allowBuilds; added lightningcss back) - add `typecheck` script + document in CLAUDE.md No behavior changes. Verified: typecheck, lint, test, and build all pass; client bundle confirmed free of server-only code.ronnyandre referenced this pull request2026-06-04 13:21:34 +02:00