-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtsconfig.json
More file actions
50 lines (44 loc) · 2.39 KB
/
tsconfig.json
File metadata and controls
50 lines (44 loc) · 2.39 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
{
"compilerOptions": {
"lib": [
"ESNext",
"dom"
],
"jsx": "react-jsx",
"outDir": "dist",
"removeComments": false, // Strips all comments from TypeScript files when converting into JavaScript
"target": "ES6", // Target environment. Most modern browsers support ES6, but you may want to set it to newer or older. (defaults to ES3)
"skipLibCheck": true, // Skip type checking of all declaration files (*.d.ts)
// Module resolution
"baseUrl": ".",
"paths": {
"game/*": ["./src/app/game/*"],
"hud/*": ["./src/app/hud/*"],
"util/*": ["./src/util/*"],
"types/*": ["./src/types/*"],
"json/*": ["./src/json/*"],
"css/*": ["./src/css/*"],
},
"moduleResolution": "node", // how modules get resolved. Node is the most common
"esModuleInterop": true, // fixes some issues TS originally had with the ES6 spec where TypeScript treats CommonJS/AMD/UMD modules similar to ES6 module
"resolveJsonModule": true, // allows importing JSON files as modules
// Source Map
"sourceMap": true, // enables the use of source maps for debuggers and error reporting etc
"sourceRoot": "/", // Specify the location where a debugger should locate TypeScript files instead of relative source locations.
// Strict Checks
"strict": true, // Enabling all strict type checking options
"alwaysStrict": true, // Ensures that your files are parsed in the ECMAScript strict mode, and emit “use strict” for each source file.
"allowUnreachableCode": false, // pick up dead code paths
"noImplicitAny": true, // In some cases where no type annotations are present, TypeScript will fall back to a type of any for a variable when it cannot infer the type.
"strictNullChecks": 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.
// Linter Checks
"noImplicitReturns": true,
"noUncheckedIndexedAccess": true, // accessing index must always check for undefined
"noUnusedLocals": true, // Report errors on unused local variables.
"noUnusedParameters": true // Report errors on unused parameters in functions
},
"include": ["./**/*.ts", "src/app/main.tsx"],
"exclude": [
"node_modules/**/*"
]
}