From 8a72edd5b89cb30ca164f22d849bf57e8e8d18a5 Mon Sep 17 00:00:00 2001 From: Karl Horky Date: Sun, 13 Oct 2024 16:58:26 +0200 Subject: [PATCH] Simplify and modernize tsconfig.base.json --- tsconfig.base.json | 32 +++++++++++++++++++++----------- 1 file changed, 21 insertions(+), 11 deletions(-) diff --git a/tsconfig.base.json b/tsconfig.base.json index d6e5cc5..de8be3d 100644 --- a/tsconfig.base.json +++ b/tsconfig.base.json @@ -1,25 +1,35 @@ { "$schema": "https://json.schemastore.org/tsconfig", "display": "UpLeveled Node + React TSConfig", + // Inspired by Total TypeScript TSConfig Cheat Sheet + // https://www.totaltypescript.com/tsconfig-cheat-sheet "compilerOptions": { - "lib": ["DOM", "DOM.Iterable", "ESNext"], - "target": "ES2015", + // Module system, module resolution "module": "Preserve", "moduleDetection": "force", - "resolveJsonModule": true, - "esModuleInterop": true, - "isolatedModules": true, "allowJs": true, - "allowSyntheticDefaultImports": true, - "downlevelIteration": true, - "forceConsistentCasingInFileNames": true, - "jsx": "react-jsx", + "esModuleInterop": true, + "resolveJsonModule": true, + "verbatimModuleSyntax": true, + + // Standard library + "lib": ["ES2022", "DOM", "DOM.Iterable"], + + // Output + "target": "ES2022", "noEmit": true, + + // Strictness + "strict": true, "noFallthroughCasesInSwitch": true, + "noUncheckedIndexedAccess": true, + + // Performance "skipLibCheck": true, - "strict": true, "incremental": true, - "noUncheckedIndexedAccess": true + + // React + "jsx": "react-jsx" }, "exclude": ["${configDir}/node_modules", "${configDir}/build"] }