Skip to content

Commit

Permalink
feat(tsconfig.json): update TypeScript configuration for ES2024 suppo…
Browse files Browse the repository at this point in the history
…rt 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
  • Loading branch information
Bluzzi committed Dec 25, 2024
1 parent 1e63bcb commit a1f905c
Showing 1 changed file with 23 additions and 9 deletions.
32 changes: 23 additions & 9 deletions tsconfig.json
Original file line number Diff line number Diff line change
@@ -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"]
},
}
}

0 comments on commit a1f905c

Please sign in to comment.