forked from yorgai/ORG2
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtsconfig.json
More file actions
108 lines (91 loc) · 3.86 KB
/
Copy pathtsconfig.json
File metadata and controls
108 lines (91 loc) · 3.86 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
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
/**
* TypeScript Configuration
*
* Configures the TypeScript compiler for the project.
*
* Notes:
* - Type checking is handled by IDE for performance (see webpack.config.js)
* - Webpack uses esbuild-loader (fast) or ts-loader with transpileOnly: true
* - This config is mainly for IDE type checking and tooling support
*
* Build Process:
* - Development (default): esbuild-loader (10-100x faster)
* - Development (SLOW_DEV=true): ts-loader with transpileOnly
* - Production: esbuild-loader with optimizations
*
* Related Files:
* - webpack.config.js - Build configuration
* - .eslintrc.js - Linting configuration
* - src/types/ambient/ - Global type definitions
*/
{
"compilerOptions": {
// ============================================
// Module Resolution & Paths
// ============================================
"baseUrl": ".",
"paths": {
"@/*": ["./*"],
"@src/*": ["src/*"],
"@api/*": ["src/api/*"],
"@common/*": ["src/common/*"],
"@page/*": ["src/page/*"],
"@assets/*": ["src/assets/*"]
},
"moduleResolution": "node",
// ============================================
// Module & Target
// ============================================
"module": "ESNext", // Modern ES modules (better tree-shaking)
"target": "ES2020", // Modern JS features (optional chaining, nullish coalescing)
"lib": [
"ES2020", // Modern JavaScript features
"DOM", // Browser DOM APIs
"DOM.Iterable" // Iterable DOM collections
],
// ============================================
// JSX & React
// ============================================
"jsx": "react-jsx", // New JSX transform (no need to import React)
// ============================================
// Type Checking
// ============================================
"strict": true, // Enable all strict type checking
"strictNullChecks": true, // Strict null checking (already included in strict)
"noImplicitAny": true, // Error on expressions with implied 'any'
"noUnusedLocals": false, // Allow unused locals (enforced by ESLint)
"noUnusedParameters": false, // Allow unused params (enforced by ESLint)
"noFallthroughCasesInSwitch": true, // Error on switch fallthrough
"forceConsistentCasingInFileNames": true, // Enforce case sensitivity in imports
// ============================================
// Module Features
// ============================================
"esModuleInterop": true, // Better CommonJS/ES6 module compatibility
"allowSyntheticDefaultImports": true, // Allow default imports from modules
"resolveJsonModule": true, // Allow importing JSON files
"isolatedModules": true, // Ensure each file can be transpiled independently
// ============================================
// Performance & Build
// ============================================
"skipLibCheck": true, // Skip type checking of declaration files (faster)
"outDir": "dist", // Output directory for compiled files
// ============================================
// Type Declarations
// ============================================
"types": ["node", "vitest/globals"] // Node + Vitest globals for *.test.ts (vitest.config globals: true)
},
// ============================================
// Files to Include/Exclude
// ============================================
"include": [
"src/**/*" // Source files and global type definitions
],
"exclude": [
"node_modules", // Dependencies (explicitly exclude all node_modules)
"**/node_modules/**", // Explicitly exclude node_modules at any level
"dist", // Build output
"build", // Webpack build output
".market", // Archived market business; not part of any build (see docs/shared/oss-market-extraction--0507.md)
".archive" // Parked code excluded from build (see .archive/README.md)
]
}