Repository navigation
Expand file tree
/
Copy pathtsconfig.json
More file actions
40 lines (38 loc) · 1.73 KB
/
Copy pathtsconfig.json
File metadata and controls
40 lines (38 loc) · 1.73 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
{
"compilerOptions": {
"target": "ES2020",
"useDefineForClassFields": true,
"lib": ["ES2020", "DOM", "DOM.Iterable"],
"module": "ESNext",
"moduleResolution": "bundler",
"jsx": "react-jsx",
// "node" is here only for test/client: those files run under `node --test`
// and import node:test, node:assert, node:fs, so without it every one of
// them fails to resolve. client/ itself must never see node globals — a
// `process.env` or `Buffer` that typechecks here dies in the browser — but
// tsc has no per-directory `types`, so this is the price of checking the
// tests at all. Nothing mechanical stops a node global reaching client/;
// review does.
"types": ["vite/client", "node"],
"strict": true,
"noUnusedLocals": true,
"noUnusedParameters": true,
"noFallthroughCasesInSwitch": true,
"noEmit": true,
// Enabled so pure lib modules (e.g. lib/pager.ts) can use explicit .ts
// specifiers on sibling imports — the only way node's native TS
// type-stripping (used by `npm test`) resolves a relative import with no
// build step in between. Safe because noEmit is already true: tsc never
// emits these paths into real output, Vite (which understands .ts
// specifiers natively) owns the actual bundle.
"allowImportingTsExtensions": true,
"isolatedModules": true,
"skipLibCheck": true,
"esModuleInterop": true,
"resolveJsonModule": true
},
// test/client went entirely unchecked until 2026-09-17: `include` named only
// `client`, so nothing — not tsc, not Vite, not the test run — ever read a
// type in these 18 files, and 54 errors had piled up behind that gap.
"include": ["client", "test/client", "packages/**/*.ts"]
}