Repository navigation
Expand file tree
/
Copy pathtsconfig.base.json
More file actions
52 lines (47 loc) · 2.06 KB
/
Copy pathtsconfig.base.json
File metadata and controls
52 lines (47 loc) · 2.06 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
48
49
50
51
52
{
"$schema": "https://json.schemastore.org/tsconfig",
"compilerOptions": {
"target": "ES2022",
"module": "ESNext",
"moduleResolution": "Bundler",
"ignoreDeprecations": "6.0",
"lib": ["ES2023"],
"types": [],
"strict": true,
"noUncheckedIndexedAccess": true,
"noImplicitOverride": true,
"noFallthroughCasesInSwitch": true,
// Dead code and unreachable branches are how a refactor leaves a limb behind that still typechecks.
// Every one of these was measured at ZERO existing violations across the tier-0 + platform packages
// before being turned on, so they cost nothing today and only bite on new code.
"noUnusedLocals": true,
"noUnusedParameters": true,
"noImplicitReturns": true,
"allowUnreachableCode": false,
"allowUnusedLabels": false,
"noUncheckedSideEffectImports": true,
// DELIBERATELY NOT ENABLED, with the reason, so the next person does not re-litigate it blind:
//
// exactOptionalPropertyTypes — genuinely valuable (it distinguishes "absent" from "present and
// undefined", which is exactly the class of bug that produced several defects in the WebView
// bridge). Measured at 182 errors across 7 packages alone, so it is a migration of its own
// rather than a flag flip. Worth scheduling.
//
// erasableSyntaxOnly — rejects `enum`, and the LogLevel/Severity enums in @bugsee/protocol are
// part of the wire contract. Converting them to const objects is churn with no safety gain.
//
// noPropertyAccessFromIndexSignature — 65 errors, and it buys style (obj['k'] over obj.k) rather
// than safety, since noUncheckedIndexedAccess already forces the undefined check that matters.
"verbatimModuleSyntax": true,
"isolatedModules": true,
"esModuleInterop": true,
"resolveJsonModule": true,
"forceConsistentCasingInFileNames": true,
"skipLibCheck": true,
"declaration": true,
"declarationMap": true,
"sourceMap": true,
"noEmit": true
},
"exclude": ["node_modules", "dist", "coverage"]
}