-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathtsconfig.base.json
More file actions
50 lines (48 loc) · 1.93 KB
/
tsconfig.base.json
File metadata and controls
50 lines (48 loc) · 1.93 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
{
// Base TypeScript configuration inherited by all projects in the monorepo.
// Projects extend this via their own tsconfig.json → { "extends": "../../tsconfig.base.json" }
"compileOnSave": false,
"compilerOptions": {
// ── Module System ──
"allowImportingTsExtensions": true,
// ── Strict Safety ──
// All strict flags are on; these additional flags catch more bugs:
"allowUnreachableCode": false,
"allowUnusedLabels": false,
// ── Build ──
"baseUrl": ".",
"declaration": false,
"emitDecoratorMetadata": true,
"esModuleInterop": true,
"exactOptionalPropertyTypes": true, // { x?: string } means string|undefined, not string|undefined|missing
"experimentalDecorators": true,
"forceConsistentCasingInFileNames": true,
"importHelpers": true,
"isolatedModules": true, // Required for tools like esbuild/swc that compile files independently
"lib": ["ES2022"],
"module": "NodeNext",
"moduleResolution": "NodeNext",
"noFallthroughCasesInSwitch": true,
"noImplicitOverride": true,
"noImplicitReturns": true,
"noPropertyAccessFromIndexSignature": true, // Forces bracket notation for index signatures
"noUncheckedIndexedAccess": true, // arr[0] is T|undefined, not T — prevents runtime crashes
"noUncheckedSideEffectImports": true,
"noUnusedLocals": true,
"noUnusedParameters": true,
// ── Monorepo Path Aliases ──
// Enables `import { Button } from "@monorepo/lexico-components"` across projects
"paths": {
"@monorepo/lexico-components": ["packages/lexico-components/src/index.ts"]
},
"resolveJsonModule": true,
"rootDir": ".",
"skipDefaultLibCheck": true,
"skipLibCheck": true,
"sourceMap": true,
"strict": true,
"target": "ES2022",
"verbatimModuleSyntax": true // Enforces `import type` for type-only imports
},
"exclude": [".nx", "build", "dist", "node_modules", "tmp"]
}