-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathtsconfig.json
More file actions
70 lines (70 loc) · 3.03 KB
/
Copy pathtsconfig.json
File metadata and controls
70 lines (70 loc) · 3.03 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
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
/* To learn more about this file see: https://angular.io/config/tsconfig. */
{
"compileOnSave": false,
"compilerOptions": {
"baseUrl": "./",
"outDir": "./dist/out-tsc",
"forceConsistentCasingInFileNames": true,
"esModuleInterop": true,
"strict": true,
"noImplicitOverride": true,
"noPropertyAccessFromIndexSignature": true,
"allowJs": true,
"noImplicitReturns": true,
"noFallthroughCasesInSwitch": true,
"sourceMap": true,
"declaration": false,
"skipLibCheck": true,
"isolatedModules": true,
"experimentalDecorators": true,
"resolveJsonModule": true,
"moduleResolution": "bundler",
"importHelpers": true,
"paths": {
"reactome-cytoscape-style": ["dist/reactome-cytoscape-style"],
"reactome-table": ["dist/reactome-table"],
"reactome-gsa-form": ["dist/reactome-gsa-form"]
},
"target": "ES2022",
"module": "ES2022",
"useDefineForClassFields": false,
"typeRoots": ["node_modules/@types", "node_modules/reactome-cytoscape-style/types", "src/types"]
},
// Strictness here is a deliberate trade: each of these was measured against
// the codebase before being switched on. strictTemplates cost 83 fixes and
// was worth it; typeCheckHostBindings, strictStandalone and the checks below
// all cost nothing. noUncheckedIndexedAccess (185 errors) and
// exactOptionalPropertyTypes (72) are not on -- worth revisiting, but not
// free. noUncheckedIndexedAccess was trialled properly rather than dismissed:
// of its 185 findings, roughly 44% are places the code already checks .length
// or iterates a bounded loop and TypeScript simply cannot connect the check to
// the access, where the only "fix" is a non-null assertion that documents
// nothing. The remainder did contain two real bugs, both since fixed (see
// 0178da7). Worth revisiting as its own piece of work, but adopting it in one
// go would trade 185 edits, most of them assertions, for that handful.
// strictStandalone is deliberately absent: reactome-table is still an
// NgModule library with declared, non-standalone components, and it is
// published, so converting it is not a config change. The redundancy diagnostics (NG8107/NG8102, ~51 findings) stay at
// their default warning: they fire where a type says a value cannot be null,
// which is not the same as the API guaranteeing it, so making them errors
// would push people to delete defensive code on the word of an optimistic
// type.
"angularCompilerOptions": {
"enableI18nLegacyMessageIdFormat": false,
"strictInjectionParameters": true,
"strictInputAccessModifiers": true,
"strictTemplates": true,
"typeCheckHostBindings": true,
"extendedDiagnostics": {
"checks": {
"invalidBananaInBox": "error",
"uninvokedFunctionInEventBinding": "error",
"missingControlFlowDirective": "error",
"textAttributeNotBinding": "error",
"suffixNotSupported": "error",
"skipHydrationNotStatic": "error",
"unusedStandaloneImports": "error"
}
}
}
}