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.
This commit is contained in:
kmou424
2026-06-17 00:23:35 +08:00
parent 0775747b43
commit a46a5d703c
6 changed files with 24 additions and 50 deletions

View File

@@ -1,13 +1,4 @@
{ {
"compilerOptions": { "extends": "../../tsconfig.base.json",
"target": "ESNext",
"module": "ESNext",
"moduleResolution": "bundler",
"esModuleInterop": true,
"strict": true,
"noEmit": true,
"skipLibCheck": true,
"types": ["bun"]
},
"include": ["src"] "include": ["src"]
} }

View File

@@ -1,13 +1,4 @@
{ {
"compilerOptions": { "extends": "../../tsconfig.base.json",
"target": "ESNext",
"module": "ESNext",
"moduleResolution": "bundler",
"esModuleInterop": true,
"strict": true,
"noEmit": true,
"skipLibCheck": true,
"types": ["bun"]
},
"include": ["src"] "include": ["src"]
} }

View File

@@ -1,13 +1,4 @@
{ {
"compilerOptions": { "extends": "../../tsconfig.base.json",
"target": "ESNext",
"module": "ESNext",
"moduleResolution": "bundler",
"esModuleInterop": true,
"strict": true,
"noEmit": true,
"skipLibCheck": true,
"types": ["bun"]
},
"include": ["src"] "include": ["src"]
} }

View File

@@ -1,13 +1,4 @@
{ {
"compilerOptions": { "extends": "../../tsconfig.base.json",
"target": "ESNext",
"module": "ESNext",
"moduleResolution": "bundler",
"esModuleInterop": true,
"strict": true,
"noEmit": true,
"skipLibCheck": true,
"types": ["bun"]
},
"include": ["src"] "include": ["src"]
} }

19
tsconfig.base.json Normal file
View File

@@ -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"]
}
}

View File

@@ -1,13 +1,4 @@
{ {
"compilerOptions": { "extends": "./tsconfig.base.json",
"target": "ESNext",
"module": "ESNext",
"moduleResolution": "bundler",
"esModuleInterop": true,
"strict": true,
"noEmit": true,
"skipLibCheck": true,
"types": ["bun"]
},
"include": ["packages/*/src"] "include": ["packages/*/src"]
} }