-
Notifications
You must be signed in to change notification settings - Fork 0
/
tsconfig.base.json
104 lines (77 loc) · 4.08 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
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
{
"$schema": "https://json.schemastore.org/tsconfig",
"compilerOptions": {
"strict": true,
"strictNullChecks": true,
"strictBindCallApply": true,
"noImplicitAny": true,
"target": "ESNext", // ES2022
"module": "ESNext",
"lib": ["ES2022", "ES2022.Intl"], // add ["DOM", "DOM.Iterable"] for front-end projects
// enable colorized terminal output for readability
"pretty": true,
// preserve jsdoc comments for intellisense
"removeComments": false,
// enable module resolution without file extensions on relative paths for things like npm package imports.
"moduleResolution": "bundler",
// allow json imports
"resolveJsonModule": true,
// enforce the usage of type-only imports when needed to avoid bundling issues and improve performance
"verbatimModuleSyntax": true,
// ensure that each file can be transpiled without relying on other imports
// this is redundant with the previous option however it ensures that it's on even if someone disables `verbatimModuleSyntax`
"isolatedModules": true,
// report an error when importing a file using a casing different from another import of the same file
"forceConsistentCasingInFileNames": true,
// properly support importing CJS modules in ESM
"esModuleInterop": true,
// skip typechecking libraries and .d.ts files for faster builds (and not deal with upstream type issues)
"skipLibCheck": true,
// allow JavaScript files to be imported (for example supports autocompletion in *.config.mjs files)
"allowJs": true,
// allow JSX files (or files that are internally considered JSX such as Astro files) to be imported inside `.js` and `.ts` files.
"jsx": "preserve",
// use the following instead of the above for astro and react component libraries/packages in the workspace
// "jsx": "react-jsx",
// "jsxImportSource": "react",
// enforce function types
"strictFunctionTypes": true,
// enforce that all class properties must be initialized in the constructor
"strictPropertyInitialization": false,
// a less restrictive eslint rule is used instead that allows unused locals if prefixed with an underscore
"noUnusedLocals": false,
// report an error when a parameter is declared but never used (set to `false` to prefer the eslint rule instead)
"noUnusedParameters": true,
// report an error when the value `undefined` is given to an optional property that doesn't specify `undefined` as a valid value
// this is often set to `false` for react due to common props patterns and ts-rest + react
// "exactOptionalPropertyTypes": true,
// interesting typescript thinks its on even for projects where its not (like the vite app)
"exactOptionalPropertyTypes": true,
// report errors for fallthrough cases in switch statements (this helps eliminate bugs and improve code quality)
"noFallthroughCasesInSwitch": true,
// force functions designed to override their parent class to be specified as `override`
"noImplicitOverride": true,
// force functions to specify that they can return `undefined` if a possible code path does not return a value
"noImplicitReturns": true,
// force the usage of the indexed syntax to access fields declared using an index signature
"noUncheckedIndexedAccess": true,
// report an error for unused labels instead of just a warning
"allowUnusedLabels": false
// early returns are often used in dev and debug workflows so you may want to choose `true` or `false` accordingly
// "allowUnreachableCode": false,
// "types": ["node", "vitest/globals"]
// nx left overbits
// "emitDecoratorMetadata": true,
// "experimentalDecorators": true,
// "importHelpers": true, // if enabled then tslib module must be present and able to import at runtime
// "skipDefaultLibCheck": true
// nx leftovers
// "rootDir": ".",
// "moduleResolution": "node",
// "baseUrl": ".",
// "paths": {
// "@rfx/common-contracts": ["packages/common/contracts/src/index.ts"]
// }
},
"exclude": ["node_modules", "tmp"]
}