Repository navigation
Expand file tree
/
Copy pathtsconfig.json
More file actions
65 lines (65 loc) · 1.86 KB
/
Copy pathtsconfig.json
File metadata and controls
65 lines (65 loc) · 1.86 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
58
59
60
61
62
63
64
65
{
// Visit https://aka.ms/tsconfig to read more about this file
// 仓库唯一的一份 TypeScript 配置:ts/ 的题解源码 + site/scripts 的站点生成脚本。
// 只检查站点生成脚本用 tsconfig.site.json(npm run typecheck)。
"compilerOptions": {
// File Layout
// 输入跨 ts/ 和 site/scripts/,所以不设 rootDir,产物按同样层级落在 dist/ 下
"outDir": "./dist",
// Environment Settings
// See also https://aka.ms/tsconfig/module
"module": "nodenext",
"moduleResolution": "nodenext",
"target": "esnext",
"lib": ["esnext"],
"types": [
"node"
],
// Other Outputs
"sourceMap": false,
"declaration": false,
"declarationMap": false,
// Stricter Typechecking Options
// 索引超出范围的检查
"noUncheckedIndexedAccess": false,
"exactOptionalPropertyTypes": true,
// Style Options
// "noImplicitReturns": true,
// "noImplicitOverride": true,
// "noUnusedLocals": true,
// "noUnusedParameters": true,
// "noFallthroughCasesInSwitch": true,
// "noPropertyAccessFromIndexSignature": true,
// Recommended Options
"strict": true,
"jsx": "react-jsx",
"verbatimModuleSyntax": true,
"isolatedModules": true,
"noUncheckedSideEffectImports": true,
"moduleDetection": "force",
"skipLibCheck": true,
"forceConsistentCasingInFileNames": true,
// site/scripts 由 Node 原生类型剥离直接运行,import 里带 .ts 后缀
"allowImportingTsExtensions": true,
"rewriteRelativeImportExtensions": true
},
"exclude": [
"node_modules",
"cpp",
"dist",
"Java",
"matlab",
"mcp-algorithm",
"python",
"script",
"sql",
"scss",
"site/docs/problems",
"site/docs/.vitepress/cache",
"site/docs/.vitepress/dist"
],
"include": [
"ts",
"site/scripts"
]
}