Repository navigation
Expand file tree
/
Copy pathtsconfig.json
More file actions
57 lines (51 loc) · 2.21 KB
/
Copy pathtsconfig.json
File metadata and controls
57 lines (51 loc) · 2.21 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
53
54
55
56
57
{
"$schema": "https://json.schemastore.org/tsconfig",
"compilerOptions": {
// -- Target -------------------------------------------------------------------
// ES2024: Node 22+ (V8 12.4+). Includes Array.groupBy, Promise.withResolvers,
// ArrayBuffer.resize, Atomics.waitAsync, well-formed Unicode strings,
// plus all ES2022 features (top-level await, Error.cause, Array.at).
"target": "es2024",
"module": "es2022",
"moduleResolution": "bundler",
"lib": ["es2024"],
// -- Strict - Maximum Safety --------------------------------------------------
// TS7 enables --strict by default. We go further.
"strict": true,
"noUncheckedIndexedAccess": true,
"noPropertyAccessFromIndexSignature": true,
"exactOptionalPropertyTypes": true,
"noFallthroughCasesInSwitch": true,
"forceConsistentCasingInFileNames": true,
// -- Unused Code --------------------------------------------------------------
"noUnusedLocals": true,
"noUnusedParameters": true,
// -- Module Interop -----------------------------------------------------------
"esModuleInterop": true,
"allowSyntheticDefaultImports": true,
"isolatedModules": true,
// -- Output -------------------------------------------------------------------
"outDir": "./dist",
"rootDir": "./src",
"declaration": true,
"declarationMap": true,
"sourceMap": true,
// -- Interop ------------------------------------------------------------------
"skipLibCheck": true,
"resolveJsonModule": true,
// -- Path aliases -------------------------------------------------------------
// Internal imports use @/<subpath> instead of ../../<subpath>. The TS
// compiler resolves them via these paths; tsx resolves them at dev/test
// runtime; tsc-alias rewrites them in the published dist so consumers
// see plain relative paths. Bun reads tsconfig paths natively.
//
// Note: modern TS (5.4+, including tsgo) treats `paths` values as
// relative to this tsconfig - no baseUrl needed, and entries must start
// with "./".
"paths": {
"@/*": ["./src/*"]
}
},
"include": ["src/**/*.ts"],
"exclude": ["node_modules", "dist", "tests", "**/*.test.ts"]
}