From a1f905c1c542138ae99fb147fbc403e1eb0204d4 Mon Sep 17 00:00:00 2001 From: Bluzzi Date: Wed, 25 Dec 2024 20:53:43 +0100 Subject: [PATCH] feat(tsconfig.json): update TypeScript configuration for ES2024 support and stricter type checking - Change target to ES2024 for utilizing the latest ECMAScript features - Enable allowJs to include JavaScript files in the compilation - Add moduleDetection and isolatedModules for better module handling - Introduce verbatimModuleSyntax for preserving original module syntax - Implement noUncheckedIndexedAccess and noImplicitOverride for enhanced type safety - Set module to preserve and noEmit for scenarios not involving TypeScript transpilation - Specify lib as es2022 when not running in a DOM environment - Maintain existing paths and baseUrl for custom module resolution --- tsconfig.json | 32 +++++++++++++++++++++++--------- 1 file changed, 23 insertions(+), 9 deletions(-) diff --git a/tsconfig.json b/tsconfig.json index 7df9130..88bd3d3 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -1,17 +1,31 @@ { "compilerOptions": { - "target": "ES2022", - "module": "commonjs", - "outDir": "./dist/", - "strict": true, - "resolveJsonModule": true, + /* Base Options: */ "esModuleInterop": true, "skipLibCheck": true, - "declaration": true, + "target": "ES2024", + "allowJs": true, + "resolveJsonModule": true, + "moduleDetection": "force", + "isolatedModules": true, + "verbatimModuleSyntax": true, + + /* Strictness */ + "strict": true, + "noUncheckedIndexedAccess": true, + "noImplicitOverride": true, + + /* If NOT transpiling with TypeScript: */ + "module": "preserve", + "noEmit": true, + + /* If your code doesn't run in the DOM: */ + "lib": ["es2022"], + + /* Custom paths: */ "baseUrl": ".", "paths": { "#/*": ["./src/*"] - } - }, - "include": ["./src/", "vitest.config.ts"] + }, + } } \ No newline at end of file