-
Notifications
You must be signed in to change notification settings - Fork 0
/
tsconfig.json
68 lines (61 loc) · 2 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
60
61
62
63
64
65
66
67
68
{
// ref: https://www.totaltypescript.com/tsconfig-cheat-sheet
"compilerOptions": {
/* If transpiling with TypeScript: */
"moduleResolution": "Node",
"module": "ESNext",
"target": "ESNext",
"sourceMap": true,
// /* If NOT transpiling with TypeScript: */
// "module": "preserve",
// "noEmit": true,
"esModuleInterop": true,
"allowSyntheticDefaultImports": true,
"skipLibCheck": true,
"resolveJsonModule": true,
"lib": [
"ESNext",
// 不加dom的话如果用了 windows 等变量会报错
"dom",
"dom.iterable"
],
/* Base Options: */
"allowJs": false,
"moduleDetection": "force",
"isolatedModules": true,
// "verbatimModuleSyntax": true, // 是否要限制 导入 type
/* Strictness */
"strict": true,
"strictNullChecks": true,
"noImplicitThis": true,
"noImplicitAny": true,
"noUncheckedIndexedAccess": true,
"noImplicitOverride": true,
/* AND if you're building for a library: */
"declaration": true,
/* AND if you're building for a library in a monorepo: */
"composite": true,
"incremental": true,
"declarationMap": true,
"ignoreDeprecations": "5.0",
"traceResolution": false,
"noLib": false,
"emitDecoratorMetadata": true,
"experimentalDecorators": true,
"strictFunctionTypes": true,
"alwaysStrict": true,
"skipDefaultLibCheck": true,
"suppressImplicitAnyIndexErrors": true,
"noPropertyAccessFromIndexSignature": false,
"noUnusedLocals": false,
"noUnusedParameters": false,
// Note: To transform paths for both the output .js and .d.ts files, you need both of the below entries
"plugins": [
// Transform paths in output .js files
{ "transform": "typescript-transform-paths" },
// Transform paths in output .d.ts files (Include this line if you output declarations files)
{ "transform": "typescript-transform-paths", "afterDeclarations": true }
]
},
"exclude": ["node_modules", "dist"]
}