47 lines
1.7 KiB
JSON
47 lines
1.7 KiB
JSON
{
|
|
"compilerOptions": {
|
|
// Specifying ECMAScript targets for the compiler
|
|
"target": "ESNext",
|
|
"module": "ESNext",
|
|
"lib": [
|
|
"DOM",
|
|
"DOM.Iterable",
|
|
"ESNext"
|
|
],
|
|
// Enabling options for better interoperability and module handling
|
|
"moduleResolution": "Bundler",
|
|
"esModuleInterop": true,
|
|
"allowSyntheticDefaultImports": true,
|
|
"resolveJsonModule": true,
|
|
// Configuring behavior for JSX, specific to React
|
|
"jsx": "react-jsx", // Transform JSX for React 17+ JSX Transform
|
|
// Strengthening type-checking and ensuring consistency
|
|
"strict": true, // Enable all strict type-checking options
|
|
"strictNullChecks": true, // Enable strict null checks
|
|
"noUnusedLocals": true, // Disallow unused local variables
|
|
"noUnusedParameters": true, // Disallow unused function parameters
|
|
"noFallthroughCasesInSwitch": true, // Prevent fallthrough cases in switch statements
|
|
"forceConsistentCasingInFileNames": true, // Ensure consistent file naming
|
|
// Improving project robustness
|
|
"isolatedModules": true, // Ensure correct transpiling of files
|
|
"noErrorTruncation": true, // Show full type error messages
|
|
"useDefineForClassFields": true, // Align class field behavior with the standard
|
|
// Configuring project build process
|
|
"allowJs": true, // Allow JavaScript files to be imported
|
|
"skipLibCheck": true, // Skip type checking of declaration files
|
|
"noEmit": true, // Vite handles the emitting of files
|
|
"paths": {
|
|
"@root/*": [
|
|
"./*"
|
|
]
|
|
}, // Allow absolute imports from src
|
|
},
|
|
// Specifying folders and files to include in compilation
|
|
"include": [
|
|
"src/**/*"
|
|
],
|
|
// Excluding certain directories from the compilation
|
|
"exclude": [
|
|
"node_modules"
|
|
]
|
|
} |