Problem / Motivation
Micah pointed out that the codebase is 100 % JavaScript and lacks static type safety:
Proposal — Incremental TypeScript Adoption
- Tooling – add
typescript, @types/node, @types/react/**, etc. Commit a baseline tsconfig.json (strict-ish, but not blocking migration).
- Transpile path – use
ts-node-dev for server scripts; on the client, migrate CRA → Vite (or keep CRA with react-scripts’ TS template).
- Gradual opt-in – rename high-value files to
.ts/.tsx (start with src/utils, shared hooks, & API route handlers).
- Type linting – extend ESLint with
@typescript-eslint/*; CI fails on type errors (npm run typecheck).
- Docs – update
CONTRIBUTING.md and README with setup + “How to convert a JS file to TS”.
Acceptance Criteria
Suggested Task Breakdown
| Step |
Owner |
Details |
ETA |
| 1 |
any |
Add TS deps & tsconfig.json |
1 h |
| 2 |
any |
Add ESLint/Prettier TS rules |
1 h |
| 3 |
any |
Convert src/utils/* |
2–3 h |
| 4 |
any |
Convert src/hooks/* & one sample page |
3–4 h |
| 5 |
any |
Add npm run typecheck to CI |
1 h |
| 6 |
any |
Update docs & PR template |
1 h |
Risks / Mitigations
- Large diffs → keep PRs < 300 LOC and scoped to one folder.
- Legacy bugs → run unit tests after each migration slice.
- Contributor friction → document
npx tsc --noEmit in PR checklist.
References
Problem / Motivation
Micah pointed out that the codebase is 100 % JavaScript and lacks static type safety:
Proposal — Incremental TypeScript Adoption
typescript,@types/node,@types/react/**, etc. Commit a baselinetsconfig.json(strict-ish, but not blocking migration).ts-node-devfor server scripts; on the client, migrate CRA → Vite (or keep CRA withreact-scripts’ TS template)..ts/.tsx(start withsrc/utils, shared hooks, & API route handlers).@typescript-eslint/*; CI fails on type errors (npm run typecheck).CONTRIBUTING.mdand README with setup + “How to convert a JS file to TS”.Acceptance Criteria
typescript& type deps inpackage.jsontsconfig.jsoncommittednpm run typecheckscript and CI job addedsrc/utils,src/hooks,src/components/common) converted with noanysuppressionsdocs/ts-migration.md(step-by-step guide)Suggested Task Breakdown
tsconfig.jsonsrc/utils/*src/hooks/*& one sample pagenpm run typecheckto CIRisks / Mitigations
npx tsc --noEmitin PR checklist.References