Skip to content

Commit

Permalink
Simplify and modernize tsconfig.base.json (#442)
Browse files Browse the repository at this point in the history
  • Loading branch information
karlhorky authored Oct 13, 2024
1 parent e94df20 commit 447e986
Showing 1 changed file with 21 additions and 11 deletions.
32 changes: 21 additions & 11 deletions tsconfig.base.json
Original file line number Diff line number Diff line change
@@ -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"]
}

0 comments on commit 447e986

Please sign in to comment.