-
Notifications
You must be signed in to change notification settings - Fork 5
/
tsconfig.json
63 lines (57 loc) · 2.15 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
{
"extends": "@tsconfig/strictest/tsconfig.json",
"compilerOptions": {
// Opt in to these settings
"experimentalDecorators": true,
"emitDecoratorMetadata": true,
"useDefineForClassFields": true,
// Loosen these strict settings
// I'm ok treating `foo?: string` == `foo: string | undefined`
"exactOptionalPropertyTypes": false,
// IDE shows override methods, I'm not too worried about this.
"noImplicitOverride": false,
// I don't want extra syntax just because the type has dynamic keys.
// obj.key -> obj['key'] -- no thanks
"noPropertyAccessFromIndexSignature": false,
// We use classes for GQL schema declarations, but we don't instantiate them.
"strictPropertyInitialization": false,
// I know JS allows throwing anything, so catch(e: unknown) is the "safest."
// In practice, though, all modern code we use throws Error objects.
// We also enforce this in our own codebase.
// Ideally, we could use an Error type in our catch blocks.
// But since only unknown or any is allowed, we'll use any.
"useUnknownInCatchVariables": false,
// Disabling for now, but should be enabled & fixes applied
"noFallthroughCasesInSwitch": false,
"noUncheckedIndexedAccess": false,
// Possibly enable later & fix. Might need if/when switching to non-tsc transpilation.
"isolatedModules": false,
// Handled by ESLint
"noUnusedLocals": false,
"noUnusedParameters": false,
// Transform plugins
"plugins": [
{ "transform": "typescript-transform-paths" },
{ "transform": "ts-transformer-keys/transformer" },
],
// Path resolution
"baseUrl": ".",
"paths": {
"~/common": ["./src/common"],
"~/common/*": ["./src/common/*"],
"~/core": ["./src/core"],
"~/core/*": ["./src/core/*"],
},
// Compilation
"lib": ["esnext"],
"target": "esnext",
"module": "esnext",
"moduleResolution": "bundler",
"jsx": "react-jsx",
"outDir": "./dist",
"sourceMap": true,
"incremental": true,
},
"include": ["src", "test", "tools", ".eslintrc.cjs", "jest.config.ts", "dbschema/seeds"],
"exclude": ["node_modules", "dist"]
}