From a46a5d703c749008cbd68e68f440a9af25046e6e Mon Sep 17 00:00:00 2001 From: kmou424 Date: Wed, 17 Jun 2026 00:23:35 +0800 Subject: [PATCH] refactor(build): extracted shared TypeScript config into tsconfig.base.json - Created tsconfig.base.json with shared compilerOptions (ESNext, bundler resolution, strict mode, Bun types) and workspace path mappings for all packages. - Updated root tsconfig.json and all package tsconfigs to extend the base config via `extends`, removing 50 lines of duplicated compiler options. --- packages/wow-contexts/tsconfig.json | 11 +---------- packages/wow-core/tsconfig.json | 11 +---------- packages/wow-inject/tsconfig.json | 11 +---------- packages/wow-pi/tsconfig.json | 11 +---------- tsconfig.base.json | 19 +++++++++++++++++++ tsconfig.json | 11 +---------- 6 files changed, 24 insertions(+), 50 deletions(-) create mode 100644 tsconfig.base.json diff --git a/packages/wow-contexts/tsconfig.json b/packages/wow-contexts/tsconfig.json index 1a06711..564a599 100644 --- a/packages/wow-contexts/tsconfig.json +++ b/packages/wow-contexts/tsconfig.json @@ -1,13 +1,4 @@ { - "compilerOptions": { - "target": "ESNext", - "module": "ESNext", - "moduleResolution": "bundler", - "esModuleInterop": true, - "strict": true, - "noEmit": true, - "skipLibCheck": true, - "types": ["bun"] - }, + "extends": "../../tsconfig.base.json", "include": ["src"] } diff --git a/packages/wow-core/tsconfig.json b/packages/wow-core/tsconfig.json index 1a06711..564a599 100644 --- a/packages/wow-core/tsconfig.json +++ b/packages/wow-core/tsconfig.json @@ -1,13 +1,4 @@ { - "compilerOptions": { - "target": "ESNext", - "module": "ESNext", - "moduleResolution": "bundler", - "esModuleInterop": true, - "strict": true, - "noEmit": true, - "skipLibCheck": true, - "types": ["bun"] - }, + "extends": "../../tsconfig.base.json", "include": ["src"] } diff --git a/packages/wow-inject/tsconfig.json b/packages/wow-inject/tsconfig.json index 1a06711..564a599 100644 --- a/packages/wow-inject/tsconfig.json +++ b/packages/wow-inject/tsconfig.json @@ -1,13 +1,4 @@ { - "compilerOptions": { - "target": "ESNext", - "module": "ESNext", - "moduleResolution": "bundler", - "esModuleInterop": true, - "strict": true, - "noEmit": true, - "skipLibCheck": true, - "types": ["bun"] - }, + "extends": "../../tsconfig.base.json", "include": ["src"] } diff --git a/packages/wow-pi/tsconfig.json b/packages/wow-pi/tsconfig.json index 1a06711..564a599 100644 --- a/packages/wow-pi/tsconfig.json +++ b/packages/wow-pi/tsconfig.json @@ -1,13 +1,4 @@ { - "compilerOptions": { - "target": "ESNext", - "module": "ESNext", - "moduleResolution": "bundler", - "esModuleInterop": true, - "strict": true, - "noEmit": true, - "skipLibCheck": true, - "types": ["bun"] - }, + "extends": "../../tsconfig.base.json", "include": ["src"] } diff --git a/tsconfig.base.json b/tsconfig.base.json new file mode 100644 index 0000000..223bf6a --- /dev/null +++ b/tsconfig.base.json @@ -0,0 +1,19 @@ +{ + "compilerOptions": { + "target": "ESNext", + "module": "ESNext", + "moduleResolution": "bundler", + "baseUrl": ".", + "paths": { + "wow-core": ["packages/wow-core/src/index.ts"], + "wow-contexts": ["packages/wow-contexts/src/index.ts"], + "wow-inject": ["packages/wow-inject/src/index.ts"], + "wow-statusline": ["packages/wow-statusline/src/index.ts"] + }, + "esModuleInterop": true, + "strict": true, + "noEmit": true, + "skipLibCheck": true, + "types": ["bun"] + } +} diff --git a/tsconfig.json b/tsconfig.json index 06fd597..995318c 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -1,13 +1,4 @@ { - "compilerOptions": { - "target": "ESNext", - "module": "ESNext", - "moduleResolution": "bundler", - "esModuleInterop": true, - "strict": true, - "noEmit": true, - "skipLibCheck": true, - "types": ["bun"] - }, + "extends": "./tsconfig.base.json", "include": ["packages/*/src"] }