Green up codebase: fix typecheck, lint, and test infra #1

Merged
ronnyandre merged 1 commit from chore/green-up-codebase into main 2026-06-02 13:55:40 +02:00
Owner

Greens up the codebase so CI checks pass cleanly.

  • Fix TypeScript errors surfaced by pnpm typecheck
  • Resolve ESLint violations
  • Repair test infrastructure so pnpm test runs green

60 files changed, +675 / -531.

Greens up the codebase so CI checks pass cleanly. - Fix TypeScript errors surfaced by `pnpm typecheck` - Resolve ESLint violations - Repair test infrastructure so `pnpm test` runs green 60 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.
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
ronnyandre/fliary!1
No description provided.