From 5e0ece8f0cf2fa90ed3df5cbc32f879d91e1648a Mon Sep 17 00:00:00 2001 From: peaklabs-dev <122374094+peaklabs-dev@users.noreply.github.com> Date: Wed, 4 Mar 2026 23:37:02 +0100 Subject: [PATCH] chore(tooling): reorganize and harden tsconfig.json --- tsconfig.json | 56 ++++++++++++++++++++++++++++++++++----------------- 1 file changed, 37 insertions(+), 19 deletions(-) diff --git a/tsconfig.json b/tsconfig.json index 0f2dc08..9ba0cb7 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -1,20 +1,12 @@ { - "$schema": "https://www.schemastore.org/tsconfig", - "include": ["src", "tsdown.config.ts", "eslint.config.ts", "prettier.config.ts"], - "exclude": ["tests", "dist", "node_modules"], + "$schema": "https://www.schemastore.org/tsconfig.json", + "files": ["tsdown.config.ts", "prettier.config.ts", "eslint.config.ts"], + "include": ["src/**/*.ts"], + "compilerOptions": { - "lib": ["ES2024"], - "target": "ES2024", - "module": "Preserve", - "moduleDetection": "force", - "moduleResolution": "bundler", - "allowImportingTsExtensions": true, - "verbatimModuleSyntax": true, - "noEmit": true, - "declaration": true, - "strict": true, - "allowUnusedLabels": false, + // Type Checking "allowUnreachableCode": false, + "allowUnusedLabels": false, "exactOptionalPropertyTypes": true, "noFallthroughCasesInSwitch": true, "noImplicitOverride": true, @@ -23,11 +15,37 @@ "noUncheckedIndexedAccess": true, "noUnusedLocals": true, "noUnusedParameters": true, - "isolatedModules": true, - "isolatedDeclarations": true, - "forceConsistentCasingInFileNames": true, - "skipLibCheck": true, + "strict": true, + + // Modules + "allowImportingTsExtensions": true, + "module": "esnext", + "moduleResolution": "bundler", + "noUncheckedSideEffectImports": true, "resolveJsonModule": true, - "newLine": "lf" + "types": ["node"], + + // Emit + "declaration": true, + "noEmit": true, + + // Interop Constraints + "erasableSyntaxOnly": true, + "esModuleInterop": true, + "isolatedDeclarations": true, + "verbatimModuleSyntax": true, + + // Language + "lib": ["ES2024"], + "libReplacement": false, + "moduleDetection": "force", + "target": "ES2024", + + // Projects + "incremental": true, + "tsBuildInfoFile": "./node_modules/.cache/tsconfig.tsbuildInfo", + + // Completeness + "skipLibCheck": true } }