-
Notifications
You must be signed in to change notification settings - Fork 65
/
tsconfig.json
58 lines (53 loc) · 3.71 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
{
"compilerOptions": {
// Project options
"allowJs": true, // Allow JavaScript files to be imported inside your project, instead of just .ts and .tsx files
"declaration": false, // Generate .d.ts files for every TypeScript or JavaScript file inside your project
"lib": ["es2019", "es2020", "es2021", "esnext"], // Specifies which default set of type definitions to use ("DOM", "ES6", etc)
"module": "commonjs", // Sets the module system for the program. "CommonJS" for node projects.
"noEmit": false, // Do not emit compiler output files like JavaScript source code, source-maps or declarations.
"outDir": "./dist", // .js (as well as .d.ts, .js.map, etc.) files will be emitted into this directory
"sourceMap": true, // Enables the generation of sourcemap files
"target": "es2019", // Target environment
// Module resolution
"baseUrl": "./", // Sets a base directory to resolve non-absolute module names
"esModuleInterop": true, // fixes some issues TS originally had with the ES6 spec where TypeScript treats CommonJS/AMD/UMD modules similar to ES6 module
"moduleResolution": "node", // Pretty much always node for modern JS. Other option is "classic"
"paths": {
"@application/*": ["src/application/*"],
"@domain/*": ["src/domain/*"],
"@infrastructure/*": ["src/infrastructure/*"],
"@presentation/*": ["src/presentation/*"],
"@test/*": ["test/*"],
"@/*": ["src/*"]
}, // A series of entries which re-map imports to lookup locations relative to the baseUrl
"typeRoots": ["../node_modules/@types", "node_modules/@types", "src/types"],
// Advanced
"forceConsistentCasingInFileNames": true, // TypeScript will issue an error if a program tries to include a file by a casing different from the casing on disk
"listEmittedFiles": false, // Print names of generated files part of the compilation
"listFiles": false, // Print names of files part of the compilation
"resolveJsonModule": true, // Allows importing modules with a ‘.json’ extension, which is a common practice in node projects
"skipLibCheck": true, // Skip type checking of declaration files
"traceResolution": false, // Report module resolution log messages
// Experimental
"experimentalDecorators": true, // Enables experimental support for decorators
"emitDecoratorMetadata": true, // Enables experimental support for emitting type metadata for decorators which works with the module
// Strict checks
"strict": true, // Enable all strict type-checking options
// "allowUnreachableCode": false, // Pick up dead code paths
// "alwaysStrict": true, // Parse in strict mode and emit "use strict" for each source file
// "noImplicitAny": true, // Raise error on expressions and declarations with an implied 'any' type
// "noImplicitThis": true, // Raise error on 'this' expressions with an implied 'any' type
// "strictFunctionTypes": true, // Enable strict checking of function types
// "strictNullChecks": true, // Enable strict null checks
"strictPropertyInitialization": false, // Enable strict checking of property initialization in classes
// Linter Checks
"noFallthroughCasesInSwitch": true, // Report errors for fallthrough cases in switch statement
"noImplicitReturns": true, // Report error when not all code paths in function return a value
"noUnusedLocals": true, // Report errors on unused local variables
"noUnusedParameters": true, // Report errors on unused parameters
"pretty": true // Stylize errors and messages using color and context
},
"exclude": ["node_modules", "dist"], // Specifies an array of filenames or patterns that should be skipped when resolving include
"compileOnSave": false // Compile on save
}