From 75595515b58019d3300f12e8b8cbd8a6eb6741c8 Mon Sep 17 00:00:00 2001 From: Dennis Postma Date: Tue, 24 Dec 2024 22:00:53 +0100 Subject: [PATCH] Improved typescript config --- tsconfig.json | 37 +++++++++++++++++++++++++++---------- 1 file changed, 27 insertions(+), 10 deletions(-) diff --git a/tsconfig.json b/tsconfig.json index 7f43c48..6baea3d 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -1,15 +1,32 @@ { "compilerOptions": { - /* Visit https://aka.ms/tsconfig to read more about this file */ - "outDir": "./dist", - "target": "ES2022", /* Set the JavaScript language version for emitted JavaScript and include compatible library declarations. */ - "module": "commonjs", /* Specify what module code is generated. */ - "typeRoots": ["./node_modules/@types"], /* Specify multiple folders that act like './node_modules/@types'. */ - "esModuleInterop": true, /* Emit additional JavaScript to ease support for importing CommonJS modules. This enables 'allowSyntheticDefaultImports' for type compatibility. */ - "forceConsistentCasingInFileNames": true, /* Ensure that casing is correct in imports. */ - "strict": true, /* Enable all strict type-checking options. */ - "skipLibCheck": true, /* Skip type checking of declaration files. */ + // Enable latest features + "lib": ["ESNext"], + "target": "ESNext", + "module": "ESNext", + "moduleDetection": "force", + "allowJs": true, + "declaration": true, + + // Best practices + "strict": true, + "skipLibCheck": true, + "noFallthroughCasesInSwitch": true, + + "baseUrl": ".", + "paths": { + "#utilities/*": ["./src/utilities/*"], + }, + + // Specify multiple folders that act like './node_modules/@types' + "typeRoots": ["./node_modules/@types"], + + // Other options + "esModuleInterop": true, + "forceConsistentCasingInFileNames": true, "experimentalDecorators": true, "emitDecoratorMetadata": true, - } + }, + "include": ["**/*.ts", "**/*.tsx"], + "exclude": ["node_modules"] } \ No newline at end of file