{ /* The TypeScript configuration, and now the only one. It began as a translation of `jsconfig.json` so that the first day of the migration checked exactly what the last day before it checked. That file has been deleted: it was inert from the moment this one appeared, because TypeScript ignores a jsconfig wherever a tsconfig sits beside it, and keeping a second stale copy of the options invited someone to edit the one nothing reads. */ "compilerOptions": { "baseUrl": ".", "paths": { "@/*": ["./src/*"] }, "jsx": "react-jsx", "module": "esnext", "moduleResolution": "bundler", "lib": ["esnext", "dom", "dom.iterable"], "target": "esnext", /* Vite builds; this config only ever checks. Stating it means no stray output can appear next to a source file if anyone runs `tsc` directly. */ "noEmit": true, /* `allowJs` and `checkJs` were here for the migration and are gone: `src` holds 321 TypeScript files and no JavaScript, and nothing under `src` imports a `.js` module, so neither option has anything left to act on. They are removed together because they are coupled — `checkJs` without `allowJs` is TS5052, a configuration error rather than a code one. Removing them also closes a door. With `allowJs` on, a `.js` file added under `src` would be compiled and bundled silently; now it is a resolution failure, which is the correct outcome for a codebase that has finished migrating. */ /* NEW. esbuild compiles each file on its own and cannot see across them, so a construct that needs whole-program knowledge — re-exporting a type as if it were a value, most often — works under `tsc` and breaks in the bundle. This makes tsc refuse what esbuild could not have done anyway. */ "isolatedModules": true, /* NEW. macOS does not distinguish `Button` from `button`; CI does. Without this, a mis-cased import is a green local build and a red pipeline. */ "forceConsistentCasingInFileNames": true, "skipLibCheck": true, "allowSyntheticDefaultImports": true, "esModuleInterop": true, "resolveJsonModule": true, /* CHANGED, from `[]`. The empty list suppressed every ambient type package, which is why `import.meta.env` and `import.meta.glob` — Vite build-time APIs, absent from the standard `ImportMeta` — were reported as errors in eight places across the app. Named explicitly rather than left to default, because the default pulls in EVERYTHING under node_modules/@types, and `@types/node` is installed. In browser code that would make `setTimeout` return a `NodeJS.Timeout` instead of a number, which is wrong and quietly infectious: three components store a timer handle in a `useRef` and would be typed against a runtime they do not run on. Node's types belong to `vite.config.js` and `scripts/`, neither of which this project includes. */ "types": ["vite/client"], /* Off for now, and turned on a flag at a time later in the migration — `noImplicitAny`, then `strictNullChecks`, then the rest. Enabling it here would bury the ~70 real errors this project already has under several hundred more, and the point of going file by file is that each step is small enough to read. */ "strict": false }, "include": ["src/**/*"], /* `src/components/ui`, `src/api` and `src/lib` used to be listed here, inherited from jsconfig, each meant to come off as its tree was converted. They were missed, and the miss was quiet by construction: excluding a file only keeps it out of the ROOT set, and anything an included file imports is pulled in anyway, so 318 of the 321 files were being checked regardless. The three that were not are the ones nothing under `src` imports — `api/seed.ts`, `api/attendanceSeed.ts` and `lib/skills/positionFlow.ts`. They are not dead: `scripts/` loads them, `seed.ts` from six places. They were simply invisible to `tsc`, and held four real errors. Removed before the strictness ratchet rather than after, because a flag measured against an incomplete root set gives a number that grows again later for reasons that have nothing to do with the flag. */ "exclude": ["node_modules", "dist"] }