From 239a68bb48952613af06a134548aad24951f845e Mon Sep 17 00:00:00 2001 From: Maurice Date: Sun, 31 May 2026 14:24:30 +0200 Subject: [PATCH] Make the client typecheck runnable (vitest/vite ambient types) The client had no `typecheck` script and tsc couldn't even start (the baseUrl deprecation errored out, same as server/shared already silence). Add `ignoreDeprecations: "6.0"` to match the other workspaces, a `typecheck` npm script, and a src/vite-env.d.ts referencing vite/client + vitest/globals so tsc knows the test globals (describe/it/expect/vi). This turns ~3600 phantom "Cannot find name" errors into a real, measurable count (~590 actual type errors remain, to be worked down). Type-only; no runtime change. --- client/package.json | 1 + client/src/vite-env.d.ts | 2 ++ client/tsconfig.json | 1 + 3 files changed, 4 insertions(+) create mode 100644 client/src/vite-env.d.ts diff --git a/client/package.json b/client/package.json index 2736a134..670743cc 100644 --- a/client/package.json +++ b/client/package.json @@ -8,6 +8,7 @@ "prebuild": "node scripts/generate-icons.mjs", "build": "vite build", "preview": "vite preview", + "typecheck": "tsc --noEmit", "test": "vitest run", "test:unit": "vitest run tests/unit", "test:integration": "vitest run tests/integration src/**/*.test.{ts,tsx}", diff --git a/client/src/vite-env.d.ts b/client/src/vite-env.d.ts new file mode 100644 index 00000000..97ce4524 --- /dev/null +++ b/client/src/vite-env.d.ts @@ -0,0 +1,2 @@ +/// +/// diff --git a/client/tsconfig.json b/client/tsconfig.json index 0299dacd..d3c51f17 100644 --- a/client/tsconfig.json +++ b/client/tsconfig.json @@ -8,6 +8,7 @@ "moduleResolution": "bundler", "allowImportingTsExtensions": true, "baseUrl": ".", + "ignoreDeprecations": "6.0", "paths": { "@trek/shared": ["../shared/src/index.ts"], "@trek/shared/*": ["../shared/src/*"]