template-remult-app/client/tsconfig.json

57 lines
2.0 KiB
JSON

{
"compilerOptions": {
// Specifying ECMAScript targets for the compiler
// "composite": true, // Enable project references
"target": "ESNext",
"module": "ESNext",
"lib": [
"DOM",
"DOM.Iterable",
"ESNext"
],
// Enabling options for better interoperability and module handling
"moduleResolution": "Bundler",
"esModuleInterop": true,
"allowSyntheticDefaultImports": true,
"allowImportingTsExtensions": 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/*": [
"./*"
],
"@/*": [
"./src/*"
]
} // Allow absolute imports from src. Create a path alias for the root directory - @root
},
// Specifying folders and files to include in compilation
"include": [
"src/**/*"
],
// Excluding certain directories from the compilation
"exclude": [
"node_modules"
],
"references": [
{
"path": "./tsconfig.node.json"
}
]
}