Repository navigation
Expand file tree
/
Copy pathtsconfig.json
More file actions
47 lines (42 loc) · 1.8 KB
/
Copy pathtsconfig.json
File metadata and controls
47 lines (42 loc) · 1.8 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
41
42
43
44
45
46
47
{
"compilerOptions": {
// Target / module — Vite handles the actual transpilation; tsc here
// is type-check-only via `noEmit`. Keep target/module modern so we
// don't lie to the type checker about ES syntax availability.
"target": "ES2022",
"module": "ESNext",
"moduleResolution": "Bundler",
"lib": ["ES2022", "DOM", "DOM.Iterable"],
"jsx": "react-jsx",
"useDefineForClassFields": true,
// The migration is complete — src/ is 100% TypeScript. allowJs is off,
// so a stray .js under src/ silently won't be type-checked; the include
// glob is also restricted to .ts/.tsx to keep that explicit.
"allowJs": false,
// Strict mode on the TS surface that exists today. Cheap to keep
// on because the migration starts small.
"strict": true,
"noUnusedLocals": false,
"noUnusedParameters": false,
"noFallthroughCasesInSwitch": true,
"forceConsistentCasingInFileNames": true,
"noImplicitOverride": true,
"noUncheckedIndexedAccess": true,
// exactOptionalPropertyTypes evaluated and intentionally left OFF: on this
// codebase it surfaced ~24 errors that were all "widen an optional prop to
// `| undefined`" — i.e. modelling React's `prop={cond ? v : undefined}`
// idiom rather than catching real bugs. Poor cost/benefit; revisit only if
// a concrete undefined-vs-absent bug motivates it.
// Build hygiene
"noEmit": true,
"skipLibCheck": true,
"esModuleInterop": true,
"allowSyntheticDefaultImports": true,
"resolveJsonModule": true,
"isolatedModules": true,
// No baseUrl/paths yet — keep imports relative to avoid invisible
// aliasing that Vite + tsc + ESLint all have to agree on.
},
"include": ["src/**/*.ts", "src/**/*.tsx"],
"exclude": ["node_modules", "dist", "src-tauri"]
}