From da855178fb9435c224fbf7422343d95a190f7819 Mon Sep 17 00:00:00 2001 From: ymc9 <104139426+ymc9@users.noreply.github.com> Date: Sun, 1 Oct 2023 22:12:25 -0700 Subject: [PATCH] chore: unify tsconfig files --- packages/language/tsconfig.json | 21 +++---------------- packages/plugins/openapi/tsconfig.json | 14 +------------ packages/plugins/swr/tsconfig.json | 17 ++------------- packages/plugins/tanstack-query/tsconfig.json | 17 ++------------- packages/plugins/trpc/tsconfig.json | 17 ++------------- packages/runtime/tsconfig.json | 17 ++------------- packages/schema/tsconfig.json | 20 +++--------------- packages/sdk/tsconfig.json | 21 +++---------------- packages/server/tsconfig.json | 19 +++-------------- packages/testtools/package.json | 1 + tsconfig.base.json | 19 +++++++++++++++++ 11 files changed, 41 insertions(+), 142 deletions(-) create mode 100644 tsconfig.base.json diff --git a/packages/language/tsconfig.json b/packages/language/tsconfig.json index 36d8bdce1..06ce58f3e 100644 --- a/packages/language/tsconfig.json +++ b/packages/language/tsconfig.json @@ -1,22 +1,7 @@ { + "extends": "../../tsconfig.base.json", "compilerOptions": { - "target": "ES6", - "module": "CommonJS", - "lib": ["ESNext"], - "sourceMap": true, - "outDir": "dist", - "strict": true, - "noUnusedLocals": true, - "noImplicitReturns": true, - "moduleResolution": "node", - "esModuleInterop": true, - "skipLibCheck": true, - "forceConsistentCasingInFileNames": true, - "declaration": true, - "resolveJsonModule": true, - "strictPropertyInitialization": false, - "paths": {} + "outDir": "dist" }, - "include": ["src/**/*.ts"], - "exclude": ["dist", "node_modules"] + "include": ["src/**/*.ts"] } diff --git a/packages/plugins/openapi/tsconfig.json b/packages/plugins/openapi/tsconfig.json index 6eb0cff1b..bbb5b304b 100644 --- a/packages/plugins/openapi/tsconfig.json +++ b/packages/plugins/openapi/tsconfig.json @@ -1,19 +1,7 @@ { + "extends": "../../../tsconfig.base.json", "compilerOptions": { - "target": "ES6", - "module": "CommonJS", - "lib": ["ESNext"], - "sourceMap": true, "outDir": "dist", - "strict": true, - "noUnusedLocals": true, - "noImplicitReturns": true, - "moduleResolution": "node", - "esModuleInterop": true, - "skipLibCheck": true, - "forceConsistentCasingInFileNames": true, - "declaration": true, - "resolveJsonModule": true, "strictPropertyInitialization": false }, "include": ["src/**/*.ts"] diff --git a/packages/plugins/swr/tsconfig.json b/packages/plugins/swr/tsconfig.json index e2c5bd0f3..4291db7df 100644 --- a/packages/plugins/swr/tsconfig.json +++ b/packages/plugins/swr/tsconfig.json @@ -1,21 +1,8 @@ { + "extends": "../../../tsconfig.base.json", "compilerOptions": { - "target": "ES6", - "module": "CommonJS", "lib": ["ESNext", "DOM"], - "sourceMap": true, - "outDir": "dist", - "strict": true, - "noUnusedLocals": true, - "noImplicitReturns": true, - "moduleResolution": "node", - "esModuleInterop": true, - "skipLibCheck": true, - "forceConsistentCasingInFileNames": true, - "declaration": true, - "resolveJsonModule": true, - "strictPropertyInitialization": false, - "paths": {} + "outDir": "dist" }, "include": ["src/**/*.ts"] } diff --git a/packages/plugins/tanstack-query/tsconfig.json b/packages/plugins/tanstack-query/tsconfig.json index d27927629..c47be7288 100644 --- a/packages/plugins/tanstack-query/tsconfig.json +++ b/packages/plugins/tanstack-query/tsconfig.json @@ -1,21 +1,8 @@ { + "extends": "../../../tsconfig.base.json", "compilerOptions": { - "target": "ES6", - "module": "CommonJS", "lib": ["ESNext", "DOM"], - "sourceMap": true, - "outDir": "dist", - "strict": true, - "noUnusedLocals": true, - "noImplicitReturns": true, - "moduleResolution": "node", - "esModuleInterop": true, - "skipLibCheck": true, - "forceConsistentCasingInFileNames": true, - "declaration": true, - "resolveJsonModule": true, - "strictPropertyInitialization": false, - "paths": {} + "outDir": "dist" }, "include": ["src/**/*.ts"], "exclude": ["src/runtime"] diff --git a/packages/plugins/trpc/tsconfig.json b/packages/plugins/trpc/tsconfig.json index e2c5bd0f3..4291db7df 100644 --- a/packages/plugins/trpc/tsconfig.json +++ b/packages/plugins/trpc/tsconfig.json @@ -1,21 +1,8 @@ { + "extends": "../../../tsconfig.base.json", "compilerOptions": { - "target": "ES6", - "module": "CommonJS", "lib": ["ESNext", "DOM"], - "sourceMap": true, - "outDir": "dist", - "strict": true, - "noUnusedLocals": true, - "noImplicitReturns": true, - "moduleResolution": "node", - "esModuleInterop": true, - "skipLibCheck": true, - "forceConsistentCasingInFileNames": true, - "declaration": true, - "resolveJsonModule": true, - "strictPropertyInitialization": false, - "paths": {} + "outDir": "dist" }, "include": ["src/**/*.ts"] } diff --git a/packages/runtime/tsconfig.json b/packages/runtime/tsconfig.json index acc4bc58e..712e397b6 100644 --- a/packages/runtime/tsconfig.json +++ b/packages/runtime/tsconfig.json @@ -1,21 +1,8 @@ { + "extends": "../../tsconfig.base.json", "compilerOptions": { - "target": "ES6", - "module": "CommonJS", "lib": ["ESNext", "DOM"], - "sourceMap": true, - "outDir": "dist", - "strict": true, - "noUnusedLocals": true, - "noImplicitReturns": true, - "moduleResolution": "node", - "esModuleInterop": true, - "skipLibCheck": true, - "forceConsistentCasingInFileNames": true, - "declaration": true, - "resolveJsonModule": true, - "strictPropertyInitialization": false, - "paths": {} + "outDir": "dist" }, "include": ["src/**/*.ts"], "exclude": ["src/browser"] diff --git a/packages/schema/tsconfig.json b/packages/schema/tsconfig.json index ede818c7f..0cc75a43a 100644 --- a/packages/schema/tsconfig.json +++ b/packages/schema/tsconfig.json @@ -1,22 +1,8 @@ { + "extends": "../../tsconfig.base.json", "compilerOptions": { - "target": "ES6", - "module": "commonjs", - "lib": ["ESNext"], - "sourceMap": true, - "outDir": "dist", - "strict": true, - "noUnusedLocals": false, - "noImplicitReturns": true, - "moduleResolution": "node", - "esModuleInterop": true, - "skipLibCheck": true, - "forceConsistentCasingInFileNames": true, - "baseUrl": ".", - "resolveJsonModule": true, - "declaration": true, - "experimentalDecorators": true + "outDir": "dist" }, "include": ["src/**/*.ts"], - "exclude": ["dist", "bundle", "node_modules", "src/extension.ts"] + "exclude": ["src/extension.ts"] } diff --git a/packages/sdk/tsconfig.json b/packages/sdk/tsconfig.json index f6dff1942..06ce58f3e 100644 --- a/packages/sdk/tsconfig.json +++ b/packages/sdk/tsconfig.json @@ -1,22 +1,7 @@ { + "extends": "../../tsconfig.base.json", "compilerOptions": { - "target": "ES6", - "module": "CommonJS", - "lib": ["ESNext", "DOM"], - "sourceMap": true, - "outDir": "dist", - "strict": true, - "noUnusedLocals": true, - "noImplicitReturns": true, - "moduleResolution": "node", - "esModuleInterop": true, - "skipLibCheck": true, - "forceConsistentCasingInFileNames": true, - "declaration": true, - "resolveJsonModule": true, - "strictPropertyInitialization": false, - "paths": {} + "outDir": "dist" }, - "include": ["src/**/*.ts"], - "exclude": ["dist", "node_modules"] + "include": ["src/**/*.ts"] } diff --git a/packages/server/tsconfig.json b/packages/server/tsconfig.json index f6dff1942..27594172f 100644 --- a/packages/server/tsconfig.json +++ b/packages/server/tsconfig.json @@ -1,22 +1,9 @@ { + "extends": "../../tsconfig.base.json", "compilerOptions": { - "target": "ES6", - "module": "CommonJS", "lib": ["ESNext", "DOM"], - "sourceMap": true, "outDir": "dist", - "strict": true, - "noUnusedLocals": true, - "noImplicitReturns": true, - "moduleResolution": "node", - "esModuleInterop": true, - "skipLibCheck": true, - "forceConsistentCasingInFileNames": true, - "declaration": true, - "resolveJsonModule": true, - "strictPropertyInitialization": false, - "paths": {} + "strictPropertyInitialization": false }, - "include": ["src/**/*.ts"], - "exclude": ["dist", "node_modules"] + "include": ["src/**/*.ts"] } diff --git a/packages/testtools/package.json b/packages/testtools/package.json index de26086e9..38ae15bf1 100644 --- a/packages/testtools/package.json +++ b/packages/testtools/package.json @@ -3,6 +3,7 @@ "version": "1.0.0-beta.24", "description": "ZenStack Test Tools", "main": "index.js", + "private": true, "publishConfig": { "directory": "dist", "linkDirectory": true diff --git a/tsconfig.base.json b/tsconfig.base.json new file mode 100644 index 000000000..495472c60 --- /dev/null +++ b/tsconfig.base.json @@ -0,0 +1,19 @@ +{ + "compilerOptions": { + "target": "ES6", + "module": "commonjs", + "lib": ["ESNext"], + "sourceMap": true, + "strict": true, + "noUnusedLocals": false, + "noImplicitReturns": true, + "moduleResolution": "node", + "esModuleInterop": true, + "skipLibCheck": true, + "forceConsistentCasingInFileNames": true, + "baseUrl": ".", + "resolveJsonModule": true, + "declaration": true, + "experimentalDecorators": true + } +}