From 63109e1e74382d6b13c60d030c65fa73cf3620fa Mon Sep 17 00:00:00 2001 From: liuyi Date: Sun, 11 May 2025 10:16:07 +0800 Subject: [PATCH] modify tsconfig --- tsconfig.build.json | 2 +- tsconfig.json | 34 ++++++++++++++++++++++++++-------- 2 files changed, 27 insertions(+), 9 deletions(-) diff --git a/tsconfig.build.json b/tsconfig.build.json index 64f86c6..a245dc2 100644 --- a/tsconfig.build.json +++ b/tsconfig.build.json @@ -1,4 +1,4 @@ { "extends": "./tsconfig.json", - "exclude": ["node_modules", "test", "dist", "**/*spec.ts"] + "exclude": ["node_modules", "test", "dist", "**/*spec.ts", "**.js"] } diff --git a/tsconfig.json b/tsconfig.json index 95f5641..187f885 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -1,21 +1,39 @@ { "compilerOptions": { + "strict": true, + "alwaysStrict": true, + "target": "esnext", "module": "commonjs", + "moduleResolution": "Node", "declaration": true, + "declarationMap": true, "removeComments": true, "emitDecoratorMetadata": true, "experimentalDecorators": true, "allowSyntheticDefaultImports": true, - "target": "ES2021", "sourceMap": true, - "outDir": "./dist", - "baseUrl": "./", "incremental": true, "skipLibCheck": true, "strictNullChecks": false, - "noImplicitAny": false, + "noImplicitAny": true, "strictBindCallApply": false, - "forceConsistentCasingInFileNames": false, - "noFallthroughCasesInSwitch": false - } -} + "forceConsistentCasingInFileNames": true, + "noFallthroughCasesInSwitch": false, + "isolatedModules": true, + "esModuleInterop": true, + "noUnusedLocals": true, + "noImplicitReturns": true, + "pretty": true, + "resolveJsonModule": true, + "allowJs": true, + "importsNotUsedAsValues": "remove", + "noEmit": false, + "lib": ["esnext", "DOM", "ScriptHost", "WebWorker"], + "baseUrl": ".", + "outDir": "./dist", + "paths": { + "@/*": ["./src/*"] + } + }, + "include": ["src", "test", "typings/**/*.d.ts", "**.js"] +} \ No newline at end of file