-
Notifications
You must be signed in to change notification settings - Fork 0
/
tsconfig.base.json
83 lines (83 loc) · 2.27 KB
/
tsconfig.base.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
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
{
/**
* Compiler Options
*
* NOTE:
*
* Ordered and grouped according to
* https://www.typescriptlang.org/tsconfig
*/
"compilerOptions": {
/**
* Type Checking
*
* - `strict` to reduce type issues
*/
"strict": true,
/**
* Interop Constraints
*
* - allow default imports like `import x from 'x'`
* - esModuleInterop supports supports
* - `import * as x from 'x'` and
* - `import x from 'x'`
* - ensure case sensitivity
* - strict isolated modules to help with interop
*/
"allowSyntheticDefaultImports": true,
"esModuleInterop": true,
"forceConsistentCasingInFileNames": true,
"isolatedModules": true,
/**
* Languages and Environment
*
* - `target` and `lib` for modern JavaScript
*/
"target": "esnext",
"lib": ["ESNext", "DOM", "DOM.Iterable"],
"jsx": "preserve",
/**
* Modules
*
* - `baseUrl` to support `src/abc` to access `./src/abc`
* - `commonjs` for node projects
* - `node` for Node.js CommonJS implementation (`node12` or `nodenext` for future)
* - support JSON with `resolveJsonModule`
* - `rootDir` to specify what `.dist` root will be
* - `typeRoots` for where to look for premade types to be included
*/
"baseUrl": ".",
/**
* Removed `module` from the base config because it is different in many
* tsconfig. By leaving it out here, we try to make it more explicit when
* extending tsconfig.base.json.
*/
// "module": "commonjs",
"moduleResolution": "node",
"paths": {
"~/*": ["*"],
/**
* Required to support `typeRoots`
* https://stackoverflow.com/questions/64287224/typeroots-fails-to-find-d-ts-declaration-files-in-project
*/
"*": ["types/*"]
},
"resolveJsonModule": true,
"rootDir": ".",
"typeRoots": ["./types", "./node_modules/@types"],
/**
* Emit
*
* - Don't emit in the regular `tsconfig`. We only do it in `tsconfig.build`
*/
"noEmit": true,
/**
* Completeness
*
* - `skipLibCheck` improves performance but sacrifices accuracy with duplicate libraries
*/
"skipLibCheck": true
},
"include": ["**/*.ts", "**/*.tsx"],
"exclude": ["node_modules"]
}