-
Notifications
You must be signed in to change notification settings - Fork 0
/
tsconfig.json
101 lines (101 loc) · 4.54 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
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
{
"$schema": "https://json.schemastore.org/tsconfig",
"compilerOptions": {
"baseUrl": ".",
// Allow JavaScript files to be imported inside your project, instead of just .ts and .tsx files.
"allowJs": true,
// Allow import as default when the module does not explicitly specify a default export.
"allowSyntheticDefaultImports": true,
// Warn user if the code is provably unreachable due to the use of JavaScript syntax
"allowUnreachableCode": false,
// Ensures that your files are parsed in the ECMAScript strict mode, and emit “use strict” for each source file.
"alwaysStrict": true,
// Generate .d.ts files for every TypeScript or JavaScript file inside your project
"declaration": false,
// Offers a way to configure the root directory for where declaration files are emitted.
// "declarationDir": "types"
// Down leveling is TypeScript’s term for transpiling to an older version of JavaScript
"downlevelIteration": true,
// Only emit .d.ts files; do not emit .js files.
"emitDeclarationOnly": false,
// Enables experimental support for emitting type metadata for decorators which works with the module reflect-metadata.
"emitDecoratorMetadata": true,
"esModuleInterop": true,
// Enables experimental support for decorators, which is in stage 2 of the TC39 standardization process.
"experimentalDecorators": true,
"forceConsistentCasingInFileNames": true,
"generateCpuProfile": "profile.cpuprofile",
// Helper functions are instead imported from the tslib module.
"importHelpers": false,
"incremental": true,
"isolatedModules": true,
"jsx": "preserve",
"lib": ["dom", "dom.iterable", "esnext"],
"module": "esnext",
"noEmit": true,
// With exactOptionalPropertyTypes enabled, TypeScript applies stricter rules around how it handles properties on type or interfaces which have a ? prefix.
// "exactOptionalPropertyTypes": true,
// Report errors for fallthrough cases in switch statements
"noFallthroughCasesInSwitch": true,
// TypeScript will issue an error whenever it would have inferred any
"noImplicitAny": false,
// Receive the error when override is missing
"noImplicitOverride": false,
// When enabled, TypeScript will check all code paths in a function to ensure they return a value.
"noImplicitReturns": true,
// Raise error on ‘this’ expressions with an implied ‘any’ type.
"noImplicitThis": true,
// Raise an error because the unknown field uses dot syntax instead of indexed syntax
"noPropertyAccessFromIndexSignature": false,
// Add undefined to any un-declared field in the type
"noUncheckedIndexedAccess": true,
// Report errors on unused local variables
// Disable on development
"noUnusedLocals": false,
// Disable because for express middleware function
"noUnusedParameters": false,
// A series of entries which re-map imports to lookup locations relative to the baseUrl.
"paths": {
"@ken/*": ["*"]
},
// Do not erase const enum declarations in generated code.
"preserveConstEnums": true,
"removeComments": true,
// Allows importing modules with a ‘.json’ extension, which is a common practice in node projects.
"resolveJsonModule": true,
"skipLibCheck": true,
// Enables the generation of sourcemap files.
// These files allow debuggers and other tools to display the original TypeScript source code when actually working with the emitted JavaScript files.
"sourceMap": true,
"strict": true,
// When set, TypeScript will check that the built-in methods of functions call, bind, and apply
// are invoked with correct argument for the underlying function
"strictBindCallApply": true,
// When enabled, this flag causes functions parameters to be checked more correctly.
"strictFunctionTypes": true,
// When strictNullChecks is true, null and undefined have their own distinct types
// and you’ll get a type error if you try to use them where a concrete value is expected.
"strictNullChecks": true,
// When set to true, TypeScript will raise an error when a class property was declared but not set in the constructor.
// We should use "!" for property we have not declared
"strictPropertyInitialization": false,
// Do not emit declarations for code that has an @internal annotation in its JSDoc comment.
"stripInternal": true,
"target": "es5",
// Set the type of error to unknown
"useUnknownInCatchVariables": true,
"moduleResolution": "node"
},
"display": "Default",
"exclude": [
"node_modules",
"build",
".next",
"dist",
"test.ts",
"output",
"coverage",
"*.spec.ts"
],
"include": ["next-env.d.ts", "**/*.ts", "**/*.tsx"]
}