chore: make the root tsconfig a self-contained editor project

The root config had no include, so the editor program for any src file
swallowed every file importing 'vitepress' (tests, docs configs) and with
them dist/node/index.d.ts — whose bundled copies of the vite and
default-theme augmentations collide with the source ones under different
type identities (TS2717), alongside ~1200 phantom errors from test
globals. The root project now covers only the sources and resolves
'vitepress' onto src the way tsconfig.client.json already does; every
other config extends tsconfig.base.json directly (the root added nothing
over it), leaving their programs byte-identical.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
pull/5406/head
Divyansh Singh 2 weeks ago
parent 368b66ea94
commit 12b94474eb

@ -1,5 +1,5 @@
{ {
"extends": "../tsconfig.json", "extends": "../tsconfig.base.json",
"compilerOptions": { "compilerOptions": {
"noEmit": true, "noEmit": true,
"isolatedModules": false, "isolatedModules": false,

@ -1,5 +1,5 @@
{ {
"extends": "../tsconfig.json", "extends": "../tsconfig.base.json",
"compilerOptions": { "compilerOptions": {
"allowImportingTsExtensions": true, "allowImportingTsExtensions": true,
"noEmit": true, "noEmit": true,

@ -1,5 +1,5 @@
{ {
"extends": "./tsconfig.json", "extends": "./tsconfig.base.json",
"compilerOptions": { "compilerOptions": {
"lib": ["ES2023", "DOM", "DOM.Iterable"], "lib": ["ES2023", "DOM", "DOM.Iterable"],
"types": ["./client.d.ts"], "types": ["./client.d.ts"],

@ -1,3 +1,24 @@
// the editor's project for the sources. Self-contained: `vitepress` resolves
// onto src (same trick as tsconfig.client.json), so the built dist whose
// bundled types re-declare the `vite` and default-theme augmentations under
// different type identities never enters this program. Tests and docs have
// their own nearest tsconfigs and resolve the package normally.
{ {
"extends": "./tsconfig.base.json" "extends": "./tsconfig.base.json",
"compilerOptions": {
"paths": {
"vitepress": ["./src/client/index.ts"],
"vitepress/theme": ["./types/default-theme.d.ts"],
"@siteData": ["./src/client/shims.d.ts"],
"@theme/index": ["./src/client/shims.d.ts"],
"@localSearchIndex": ["./src/client/shims.d.ts"]
}
},
"include": [
"src",
"types",
"scripts",
"shared-globals.d.ts",
"tsdown.config.ts"
]
} }

@ -1,5 +1,5 @@
{ {
"extends": "./tsconfig.json", "extends": "./tsconfig.base.json",
"compilerOptions": { "compilerOptions": {
"lib": ["ES2023"], "lib": ["ES2023"],
"types": ["node"] "types": ["node"]

@ -1,5 +1,5 @@
{ {
"extends": "./tsconfig.json", "extends": "./tsconfig.base.json",
"compilerOptions": { "compilerOptions": {
"lib": ["ES2023"], "lib": ["ES2023"],
"types": [], "types": [],

Loading…
Cancel
Save