From b649013d1cb9195fc4b5c758663be47a2027494a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thomas=20M=C3=BCller?= Date: Fri, 4 Sep 2026 17:33:43 +0200 Subject: [PATCH] :sparkles: Extend tsconfig from @tsconfig/node26 and @tsconfig/strictest - Replace hand-rolled strict flags with @tsconfig/strictest - Pick up Node 26 module/lib/target from @tsconfig/node26 - Add exactOptionalPropertyTypes (the main strictness gain) - Pin target to es2024 to remain conservative for the published build --- package-lock.json | 16 ++++++++++++++++ package.json | 5 +++++ tsconfig.json | 28 +++++----------------------- 3 files changed, 26 insertions(+), 23 deletions(-) diff --git a/package-lock.json b/package-lock.json index d129ed0..8d41709 100644 --- a/package-lock.json +++ b/package-lock.json @@ -9,6 +9,8 @@ "version": "0.0.0", "license": "MIT", "devDependencies": { + "@tsconfig/node26": "^26.0.1", + "@tsconfig/strictest": "^2.0.8", "@types/node": "^26.4.1", "c8": "^12.0.0", "check-outdated": "^3.0.0", @@ -1398,6 +1400,20 @@ "node": "^20.19.0 || >=22.12.0" } }, + "node_modules/@tsconfig/node26": { + "version": "26.0.1", + "resolved": "https://registry.npmjs.org/@tsconfig/node26/-/node26-26.0.1.tgz", + "integrity": "sha512-NQT8JUFDKeAIWpR1dakeF534msQAsoSLr1WpKdRDt3sCvk2fsFK3EVKUBG5xKYVamiRO6yTfniiyvCaqOGgn/g==", + "dev": true, + "license": "MIT" + }, + "node_modules/@tsconfig/strictest": { + "version": "2.0.8", + "resolved": "https://registry.npmjs.org/@tsconfig/strictest/-/strictest-2.0.8.tgz", + "integrity": "sha512-XnQ7vNz5HRN0r88GYf1J9JJjqtZPiHt2woGJOo2dYqyHGGcd6OLGqSlBB6p1j9mpzja6Oe5BoPqWmeDx6X9rLw==", + "dev": true, + "license": "MIT" + }, "node_modules/@types/istanbul-lib-coverage": { "version": "2.0.6", "resolved": "https://registry.npmjs.org/@types/istanbul-lib-coverage/-/istanbul-lib-coverage-2.0.6.tgz", diff --git a/package.json b/package.json index cc268fa..8351916 100644 --- a/package.json +++ b/package.json @@ -50,6 +50,8 @@ "use:git-commit-message": "cp commit-message-template .git/COMMIT_EDITMSG || true" }, "devDependencies": { + "@tsconfig/node26": "^26.0.1", + "@tsconfig/strictest": "^2.0.8", "@types/node": "^26.4.1", "c8": "^12.0.0", "check-outdated": "^3.0.0", @@ -80,5 +82,8 @@ }, "engines": { "node": ">=26" + }, + "allowScripts": { + "lefthook@2.1.12": true } } diff --git a/tsconfig.json b/tsconfig.json index d5ddf33..a96614a 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -1,39 +1,21 @@ { + "extends": [ + "@tsconfig/node26/tsconfig.json", + "@tsconfig/strictest/tsconfig.json" + ], "compilerOptions": { "noEmit": true, "target": "es2024", - "module": "nodenext", - "moduleResolution": "nodenext", - "moduleDetection": "force", "lib": ["es2024"], - "skipLibCheck": true, - "strict": true, - "noImplicitAny": true, - "noImplicitThis": true, - "alwaysStrict": true, - "strictNullChecks": true, - "strictFunctionTypes": true, - "strictBindCallApply": true, - "strictPropertyInitialization": true, - "noImplicitReturns": true, - "noFallthroughCasesInSwitch": true, - "noUncheckedIndexedAccess": true, - "noImplicitOverride": true, - "forceConsistentCasingInFileNames": true, - "noUnusedLocals": true, - "noUnusedParameters": true, - "isolatedModules": true, "verbatimModuleSyntax": true, "allowImportingTsExtensions": true, "declaration": true, "declarationMap": true, "sourceMap": true, "outDir": "dist", - "esModuleInterop": true, "allowSyntheticDefaultImports": true, "resolveJsonModule": true, - "composite": false, - "types": ["node"] + "composite": false }, "include": ["src"] }