diff --git a/package.json b/package.json index dd6f2d9..1897974 100644 --- a/package.json +++ b/package.json @@ -9,6 +9,7 @@ "build": "vite build", "build:dev": "vite build --mode development", "lint": "eslint --max-warnings=0 .", + "typecheck": "tsc --noEmit", "preview": "vite preview", "test": "vitest run", "test:coverage": "vitest run --coverage", diff --git a/vitest.config.ts b/vitest.config.ts index 37b21aa..b717685 100644 --- a/vitest.config.ts +++ b/vitest.config.ts @@ -17,11 +17,15 @@ export default defineConfig({ include: ["src/**/*.{test,spec}.{ts,tsx}"], coverage: { provider: "v8", + // AST-aware remapping is built into vitest v4+; no opt-in needed. reporter: ["text", "text-summary", "lcov"], include: ["src/components/ui/**/*.{ts,tsx}", "src/lib/**/*.{ts,tsx}"], exclude: [ + // Test setup and helpers are not production code. "src/test/**", + // Type-only declaration files contain no executable code. "src/**/*.d.ts", + // Barrel re-exports have no logic to cover. "src/components/ui/index.ts", ], thresholds: {