From 3399691a539c39523a15d3edc2f9c0e7b53f32d7 Mon Sep 17 00:00:00 2001 From: d3v1l0n Date: Sun, 29 Dec 2024 05:59:49 +0530 Subject: [PATCH] =?UTF-8?q?=F0=9F=A7=B9=20chore:=20clarity,=20better=20lin?= =?UTF-8?q?ting,=20and=20added=20configuration=20options?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- tsconfig.app.json | 39 +++++++++++++++++++++++---------------- 1 file changed, 23 insertions(+), 16 deletions(-) diff --git a/tsconfig.app.json b/tsconfig.app.json index f0a23505..c7f48390 100644 --- a/tsconfig.app.json +++ b/tsconfig.app.json @@ -1,24 +1,31 @@ { "compilerOptions": { - "target": "ES2020", - "useDefineForClassFields": true, - "lib": ["ES2020", "DOM", "DOM.Iterable"], - "module": "ESNext", - "skipLibCheck": true, + "target": "ES2020", // Keep as is: Supports modern JavaScript features + "useDefineForClassFields": true, // Ensures that class fields are defined via 'define' (ESNext behavior) + "lib": ["ES2020", "DOM", "DOM.Iterable"], // Includes necessary libraries for web development + "module": "ESNext", // Uses the latest ES module system + "skipLibCheck": true, // Improves build speed by skipping type-checking of declaration files /* Bundler mode */ - "moduleResolution": "bundler", - "allowImportingTsExtensions": true, - "isolatedModules": true, - "moduleDetection": "force", - "noEmit": true, - "jsx": "react-jsx", + "moduleResolution": "bundler", // Configures module resolution for bundlers (Vite/Webpack) + "allowImportingTsExtensions": true, // Allows importing TypeScript files without the extension + "isolatedModules": true, // Ensures compatibility with bundlers (treats each file as a module) + "moduleDetection": "force", // Forces ECMAScript module resolution for all files + "noEmit": true, // Ensures no output is generated (useful for type-checking only) + "jsx": "react-jsx", // Supports the new JSX transform (React 17+) /* Linting */ - "strict": true, - "noUnusedLocals": true, - "noUnusedParameters": true, - "noFallthroughCasesInSwitch": true + "strict": true, // Enforces all strict type-checking options + "noUnusedLocals": true, // Ensures no unused local variables + "noUnusedParameters": true, // Ensures no unused function parameters + "noFallthroughCasesInSwitch": true, // Prevents fallthrough in switch statements + "noImplicitAny": true, // Disallows the use of the `any` type (strict type-checking) + "strictNullChecks": true, // Makes null and undefined handling more strict + "strictFunctionTypes": true, // Makes function types stricter + "esModuleInterop": true, // Ensures compatibility with CommonJS modules + "resolveJsonModule": true, // Allows importing JSON files as modules + "skipDefaultLibCheck": true // Skips type-checking of default libraries to speed up compilation }, - "include": ["src"] + "include": ["src"], // Includes all source files under the 'src' directory + "exclude": ["node_modules", "dist"] // Excludes node_modules and dist directories to speed up compilation }