Files
krow_talent_app/tsconfig.json
Aravind 2f9b3baa56 chore(ts-migration): remove the migration-only TypeScript configuration
`src` holds 321 TypeScript files and no JavaScript, so four settings that
existed only to let the two coexist have nothing left to act on. Each was
removed on its own and validated before the next.

  allowJs / checkJs   Removed together, because they are coupled: `checkJs`
                      without `allowJs` is TS5052, a configuration error
                      rather than a code one. Verified first that nothing
                      under `src` imports a `.js` module. The program still
                      resolves the same 321 files and still reports 0 errors.

                      This 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
                      right outcome for a codebase that has finished
                      migrating.

  jsconfig.json       Deleted. It had been inert since `tsconfig.json`
                      appeared — TypeScript ignores a jsconfig wherever a
                      tsconfig sits beside it — and it still carried the old
                      `types: []` and the three stale excludes. A second,
                      unread copy of the options is an invitation to edit the
                      wrong file.

  components.json     `"tsx": false` -> `true`, so `npx shadcn add` emits
                      TSX. No runtime effect; it would have quietly
                      reintroduced `.jsx` into a repository that has none.

`README.md` documented `npm run typecheck` as `tsc -p ./jsconfig.json`
with `checkJs`, which named a file that no longer exists. Corrected, along
with a stale assertion count in the same table (835, against 1691 today).

No file under `src` changed, so there is nothing for a per-file emitted-JS
comparison to compare; the bundle hash is the check that matters and it is
unmoved.

  typecheck   0 errors, 321 files in the program
  lint        exit 0
  npm test    1684/1691, the same 7 failures
  owliver     unchanged; baselines still pinned, not recaptured
  build       exit 0, bundle 74d17e2d… identical

Left in place deliberately, reported rather than removed:
`scripts/ssr-resolve.mjs`. Its own comment says it can go once `src` holds
no `.js`, but that is only half the condition — the 203 literal `.js`
paths inside `skill-check.mjs` would all have to be renamed first, and
that is a large diff against the file that guards this migration.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01HBG1wnuRfJKCstGB8Fekr8
2026-09-18 18:57:37 +05:30

90 lines
4.3 KiB
JSON

{
/* 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"]
}