-
Notifications
You must be signed in to change notification settings - Fork 0
/
tsconfig.json
59 lines (59 loc) · 2.31 KB
/
tsconfig.json
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
58
59
{
"compilerOptions": {
"allowJs": true,
"target": "ESNext",
"experimentalDecorators": true,
"module": "esnext",
"moduleResolution": "bundler",
"moduleDetection": "force",
"resolveJsonModule": true,
"allowImportingTsExtensions": true,
"lib": ["ESNext", "DOM", "DOM.Iterable", "WebWorker"],
"useDefineForClassFields": true, // https://vitejs.dev/guide/features.html#usedefineforclassfields
// Interop constraints
"isolatedModules": true,
"isolatedDeclarations": false, // NOTE: to be enabled in the future for faster builds, especially in monorepo https://github.com/microsoft/TypeScript/issues/58944 https://x.com/boshen_c/status/1803829096776106235
"esModuleInterop": true,
"forceConsistentCasingInFileNames": true,
"allowSyntheticDefaultImports": true,
"verbatimModuleSyntax": true,
// END Interop constraints
// Type checking
"strict": true,
"strictNullChecks": true,
"noImplicitOverride": true,
"noFallthroughCasesInSwitch": true,
"noUncheckedIndexedAccess": true,
"exactOptionalPropertyTypes": true,
// "noImplicitReturns": true, // Way too strict and not worth it?
// END Type checking
// Handled in eslint: disable them to prevent error duplication
"allowUnreachableCode": true, // rule name: no-unreachable
"allowUnusedLabels": true, // rule name: no-unused-labels
"noUnusedLocals": false, // rule name: no-unused-vars, @typescript-eslint/no-unused-vars
"noUnusedParameters": false, // rule name: no-unused-vars, @typescript-eslint/no-unused-vars: in `args` option
// END Handled in eslint
"jsx": "preserve", // React
"skipLibCheck": true,
"noEmit": true,
"outDir": "./dist",
"incremental": true,
"tsBuildInfoFile": "tsconfig.tsbuildinfo",
"composite": false,
"declaration": false,
"sourceMap": true,
"sourceRoot": "/",
"noEmitHelpers": true,
"importHelpers": true,
// This needs to be above root so that vscode will do auto-import correctly.
// Basically, it will respect tsconfig.base.json's aliases in paths first,
// because the full non-relative path would be longer.
"baseUrl": ".",
"paths": {
"@/*": ["./src/*"]
},
"types": ["node"]
},
"exclude": ["vitest.config.ts.timestamp*", "./dist/**/*"],
"include": ["src/**/*", "*"]
}