Repository navigation
Expand file tree
/
Copy pathtsconfig.json
More file actions
55 lines (50 loc) · 2.56 KB
/
Copy pathtsconfig.json
File metadata and controls
55 lines (50 loc) · 2.56 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
51
52
53
54
55
{
"compilerOptions": {
/* Base Options */
"esModuleInterop": true, // Interop between CommonJS and ES Modules.
"skipLibCheck": true, // Skips type checking of declaration files.
"target": "es2022", // Target ECMAScript version.
"allowJs": true, // Allows JavaScript files to be compiled.
"resolveJsonModule": true, // Allows importing JSON modules.
"moduleDetection": "force", // Forces module detection.
"isolatedModules": true, // Compiles each file in isolation.
"verbatimModuleSyntax": false, // Auto-prepends "type" before type imports.
/* Strictness */
"strict": true, // Enables all strict type-checking options.
"strictNullChecks": true, // Ensures values are not null or undefined.
"noUncheckedIndexedAccess": true, // Ensures all array accesses are checked.
"checkJs": true, // Checks JavaScript files with TypeScript.
"strictPropertyInitialization": true, // Ensures class properties are initialized.
"forceConsistentCasingInFileNames": true, // Ensures consistent casing in imports.
"noImplicitReturns": true, // Ensures functions return a value.
"noFallthroughCasesInSwitch": true, // Prevents fallthrough cases in switch statements.
"exactOptionalPropertyTypes": true, // Ensures optional properties are correctly typed.
"noImplicitOverride": true, // Ensures 'override' modifier is used.
"useUnknownInCatchVariables": true, // Uses 'unknown' type in catch variables.
/* Bundled projects */
"lib": ["dom", "dom.iterable", "ES2022"], // Specifies library files.
"noEmit": true, // Disables emitting output files.
"module": "ESNext", // Sets module code generation.
"moduleResolution": "Bundler", // Module resolution strategy.
"jsx": "preserve", // Preserves JSX in output.
"plugins": [{ "name": "next" }], // Uses 'next' plugin.
"incremental": true, // Enables incremental compilation.
/* Path Aliases */
"baseUrl": "./src", // Base directory for module resolution.
"paths": {},
/* Optimization */
"importHelpers": true, // Uses TypeScript helpers to reduce output size.
/* Types */
"types": ["node", "jest"] // Includes type definitions for Node.js and Jest.
},
"include": [
".eslintrc.config.mjs", // ESLint configuration.
"src/**/*.{ts,js,cjs,mjs}", // JavaScript & TypeScript files.
"src/**/*.spec.{ts,js,cjs,mjs}", // JavaScript & TypeScript test files.
"src/**/*.spec.ts" // JavaScript & TypeScript test files.
],
"exclude": [
"node_modules", // Excludes node_modules directory.
"dist" // Excludes dist directory.
]
}