-
Notifications
You must be signed in to change notification settings - Fork 14
/
Copy pathtsconfig.json
37 lines (37 loc) · 2.5 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
{
"compilerOptions": {
"allowImportingTsExtensions": true, // Allows `import "./file.ts";` instead of `import "./file.js";`
"noEmit": true, // Does not create output files
// Some of the below options might not apply with `noEmit: true`, I'm not sure what all.
"incremental": true, // Enables incremental compilation, build only the changed code
"strict": true, // Enables all strict type-checking options (best practice)
"rootDir": "src", // Root directory of input files
"outDir": "./build", // Output directory for compiled files
"allowJs": true, // Allows JavaScript files to be compiled alongside TypeScript files.
"target": "es6", // Specifies the ECMAScript target version
"module": "NodeNext", // Sets the module system to use (CommonJS, NodeNext, ESNext)
"lib": [
"es2024",
"dom",
], // Specifies the library files to be included in the compilation.
"sourceMap": true, // Generates source maps for debugging
"skipLibCheck": true, // Skips type checking of declaration files
"noUnusedParameters": false, // Do not allow unused parameters in functions.
"noUnusedLocals": false, // Similar to noUnusedParameters, but for local variables.
"noUncheckedIndexedAccess": true, // it ensures that indexed access types are checked for undefined values,
"esModuleInterop": true, // Enables compatibility with CommonJS modules, allowing default imports from modules with no default export.
"resolveJsonModule": true, // Allows importing JSON files as modules
"forceConsistentCasingInFileNames": true, // Ensures that file names are treated with consistent casing, which is important for cross-platform compatibility.,
"noImplicitOverride": true, // This option requires that any method in a subclass that overrides a method in a superclass must explicitly use the override keyword.
"noPropertyAccessFromIndexSignature": true, // This setting enforces that properties accessed via dot notation must be explicitly defined in the type.
"allowUnreachableCode": false, // When set to false, this option raises errors for code that is unreachable, meaning it cannot be executed.
"noFallthroughCasesInSwitch": true, // This option reports errors for switch statement cases that fall through without a break, return, or throw statement.
"noErrorTruncation": true, // When enabled, this option prevents TypeScript from truncating error messages, providing full details about the error.
"declaration": true // Generates corresponding .d.ts file
},
"include": [
"src/**/*.ts",
"src/**/*.js"
],
"exclude": []
}