-
Notifications
You must be signed in to change notification settings - Fork 1
/
tsconfig.base.json
58 lines (49 loc) · 3.76 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
{
"compilerOptions": {
/* Base target config */
"target": "es2017", // Specify ECMAScript target version:
"moduleResolution": "node", // Determine how modules get resolved.
"module": "commonjs", // Specify module code generation: Maybe ES6?
// "module": "es2015", // Specify module code generation: Maybe ES6?
"lib": ["dom", "es2017"],
/* Compatibility */
"esModuleInterop": true, // Emit __importStar and __importDefault helpers for runtime babel ecosystem compatibility and enable SyntheticDefaultImports for typesystem compatibility.
"allowSyntheticDefaultImports": true, // Allow default imports from modules with no default export. This does not affect code emit, just typechecking.
"jsx": "react", // Support JSX in .tsx files using React conventions
"resolveJsonModule": true, // Include modules imported with .json extension.
/* Output */
"noEmitOnError": true, // Do not emit outputs if any errors were reported. (probably disable it while migrating)
"declaration": true, // Generates corresponding .d.ts file.
"declarationMap": true,
"sourceMap": true, // Generates corresponding .map file
"stripInternal": true, // Do not emit declarations for code that has an /** @internal */ JSDoc annotation.
"removeComments": false, // Emit comments in the output
"importHelpers": true, // Import emit helpers (e.g. __extends, __rest, etc..) from tslib (*Requires tslib on your code*)
"downlevelIteration": true, // Provide full support for iterables in for..of, spread and destructuring when targeting ES5
// ───────────────────────── Code Nitpicking ─────────────────────────
"strict": true, // this enables the following:
"noImplicitAny": true, // Raise error on expressions and declarations with an implied any type.
"noImplicitReturns": true, // Report error when not all code paths in function return a value.
"alwaysStrict": true, // Parse in strict mode and emit "use strict" for each source file
"strictNullChecks": true, // null and undefined values are not in the domain of every type and are only assignable to themselves.
"strictFunctionTypes": true, // Disable bivariant parameter checking for function types.
"strictPropertyInitialization": true, // Ensure non-undefined class properties are initialized in the constructor
"noImplicitThis": true, // Raise error on this expressions with an implied any type.
"strictBindCallApply": true, // Enable stricter checking of of the bind, call, and apply methods on functions.
"forceConsistentCasingInFileNames": true, // Disallow inconsistently-cased references to the same file.
"noFallthroughCasesInSwitch": true, // Report errors for fallthrough cases in switch statement.
"noUnusedLocals": true, // Report errors on unused locals.
"noUnusedParameters": true, // Report errors on unused parameters.
"emitDecoratorMetadata": true, // Emit design-type metadata for decorated declarations in source.
"experimentalDecorators": true, // Enables experimental support for ES decorators.
"allowUnreachableCode": false, // report errors on unreachable code.
"allowUnusedLabels": false, // report errors on unused labels.
/* Relaxing errors */
"suppressExcessPropertyErrors": false, // Suppress excess property checks for object literals.
"suppressImplicitAnyIndexErrors": true, // Suppress errors for indexing objects lacking index signatures
/* Extras */
"pretty": true, // Stylize errors and messages using color and context.
"preserveWatchOutput": true // Keep outdated console output in watch mode instead of clearing the screen.
},
"exclude": ["node_modules", "**/coverage", "**/dist", "**/lib"]
}