-
Notifications
You must be signed in to change notification settings - Fork 215
Expand file tree
/
Copy pathtsconfig.json
More file actions
52 lines (48 loc) · 1.46 KB
/
tsconfig.json
File metadata and controls
52 lines (48 loc) · 1.46 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
{
"compilerOptions": {
/* 基础选项 */
"target": "ES2022",
"lib": ["DOM", "DOM.Iterable", "ES2022"],
"module": "ESNext",
"skipLibCheck": true,
/* 模块解析 */
"moduleResolution": "bundler",
"allowImportingTsExtensions": true,
"isolatedModules": true,
"moduleDetection": "force",
"noEmit": true,
"jsx": "react-jsx",
"jsxImportSource": "react",
/* 严格类型检查 */
"strict": true,
"noUnusedLocals": true,
"noUnusedParameters": true,
"noFallthroughCasesInSwitch": true,
/* 路径别名(与你的 vite.config.ts 保持一致) */
"baseUrl": ".",
"paths": {
"@/*": ["./src/*"],
"@src/*": ["./src/*"],
"@app": ["./src"],
"@app/*": ["./src/*"],
"@stateless/*": ["./src/components/stateless/*"],
"@stateful/*": ["./src/components/stateful/*"],
"@hooks/*": ["./src/components/hooks/*"],
"@app-hooks/*": ["./src/app-hooks/*"],
"@assets/*": ["./src/assets/*"],
"@pages/*": ["./src/pages/*"],
"@routers": ["./src/routers/index"],
"@routers/*": ["./src/routers/*"],
"@utils/*": ["./src/utils/*"],
"@theme/*": ["./src/theme/*"]
},
/* 其他推荐选项 */
"resolveJsonModule": true,
"allowSyntheticDefaultImports": true,
"esModuleInterop": true,
"forceConsistentCasingInFileNames": true,
"allowJs": true
},
"include": ["src", "typings"],
"exclude": ["node_modules", "dist", "coverage"]
}