-
-
Notifications
You must be signed in to change notification settings - Fork 2.4k
Expand file tree
/
Copy pathtsconfig.json
More file actions
83 lines (83 loc) Β· 3.18 KB
/
tsconfig.json
File metadata and controls
83 lines (83 loc) Β· 3.18 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
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
{
"compilerOptions": {
// ======================================================================
// Language & Environment
// Defines JavaScript version and runtime environment
// ======================================================================
"target": "ES2017",
"module": "esnext",
"lib": ["dom", "dom.iterable", "esnext"],
"moduleResolution": "bundler",
"isolatedModules": true,
// ======================================================================
// Type Safety - Foundation
// Core type checking settings for a robust codebase
// ======================================================================
"strict": true,
"alwaysStrict": true,
"strictNullChecks": true,
"noImplicitAny": true,
"noImplicitThis": true,
// ======================================================================
// Type Safety - Advanced
// Additional checks for higher code quality
// ======================================================================
"noUncheckedIndexedAccess": true,
"noImplicitReturns": true,
"noUnusedLocals": true,
"noUnusedParameters": true,
"noFallthroughCasesInSwitch": true,
"noUncheckedSideEffectImports": true,
"allowUnreachableCode": false,
"allowUnusedLabels": false,
"useUnknownInCatchVariables": true,
"noImplicitOverride": true,
// ======================================================================
// Interoperability
// Settings for working with different file types and modules
// ======================================================================
"allowJs": true,
"checkJs": true,
"esModuleInterop": true,
"resolveJsonModule": true,
// ======================================================================
// Build & Performance
// Settings that affect compilation output and build performance
// ======================================================================
"skipLibCheck": true,
"removeComments": true,
"preserveConstEnums": true,
"forceConsistentCasingInFileNames": true,
// ======================================================================
// Project Structure
// Configure import paths and module resolution
// ======================================================================
"paths": {
"@/*": ["./src/*"],
"@/public/*": ["./public/*"]
},
// ======================================================================
// Next.js Project Configuration
// Controls settings specific to Next.js framework
// ======================================================================
"jsx": "react-jsx", // Uses the React automatic runtime
"incremental": true, // Enable faster incremental builds
"noEmit": true, // Skip emitting files (Next.js handles this)
"plugins": [
{
"name": "next"
}
] // Enable Next.js TypeScript plugin
},
// Files to include/exclude from the project
"exclude": ["node_modules", "**/*.spec.ts", "**/*.e2e.ts"],
"include": [
"next-env.d.ts",
"**/*.ts",
"**/*.tsx",
".storybook/**/*.ts",
".next/types/**/*.ts",
".next/dev/types/**/*.ts",
"**/*.mts"
]
}