-
Notifications
You must be signed in to change notification settings - Fork 2
/
tsconfig.json
59 lines (55 loc) · 1.69 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
{
"ts-node": {
"transpileOnly": true,
"require": ["typescript-transform-paths/register"],
"compilerOptions": {
// Sometimes projects (e.g. Nextjs) will want code to emit ESM but ts-node will not work with that.
"module": "CommonJS"
}
},
"compilerOptions": {
// Make the compiler stricter, catch more errors
"strict": true,
"noImplicitReturns": true,
"noFallthroughCasesInSwitch": true,
"noUncheckedIndexedAccess": true,
"noImplicitOverride": true,
"forceConsistentCasingInFileNames": true,
// We handle these with ESLint:
// "noUnusedLocals": false,
// "noUnusedParameters": false,
// Output
"target": "ES2019",
"module": "commonjs",
"moduleResolution": "Node",
"importHelpers": true,
// DX
"incremental": true,
"tsBuildInfoFile": "node_modules/.cache/.tsbuildinfo",
"noErrorTruncation": true,
"baseUrl": "./",
"paths": {
"~*": ["./src/*"]
},
// Other
// Only enable this for applications.
// Packages doing this force their consumers to.
// "esModuleInterop": true,
// Transformer Plugins made possible by https://github.com/nonara/ts-patch
"plugins": [
// https://github.com/dsherret/ts-nameof
{ "transform": "ts-nameof", "type": "raw" },
// https://github.com/LeDDGroup/typescript-transform-paths
{ "transform": "typescript-transform-paths" },
{ "transform": "typescript-transform-paths", "afterDeclarations": true }
]
},
"include": ["src", "tests", "scripts"],
// Prevent unwanted things like auto-import from built modules
"exclude": ["dist-*"],
"plugins": [
{
"name": "typescript-snapshots-plugin"
}
]
}