Skip to content

Commit 03f6439

Browse files
committed
chore(tsconfig): extend canonical fleet base, lift extension-specific knobs
Restructures the concrete tsconfig.json to extend tsconfig.base.json (was previously standalone) and consolidates the extension-only knobs: - lib: ["DOM", "ES2024"] — WASM glue (Go runtime, acorn-wasm) needs DOM. - declaration: true — extension ships .d.ts. - allowSyntheticDefaultImports: true — VS Code API + WASM ergonomics. - erasableSyntaxOnly: false — extension uses parameter properties / decorators that emit runtime code; erasable-only would forbid them. - noEmit: false / noEmitOnError: false — VS Code extension emits. - sourceMap: true — extension host debugger needs source maps. The 7 other strict flags previously kept lax (noUnusedLocals, noUnusedParameters, noPropertyAccessFromIndexSignature, noUncheckedIndexedAccess, verbatimModuleSyntax, exactOptionalPropertyTypes) now flow through from the fleet-canonical base. Also narrows the build tsconfig include to ../src/**/*.ts so it doesn't sweep .config/ tooling sources, switches moduleResolution to bundler to silence deprecation warnings, removes the verbatimModuleSyntax: false override from tsconfig.check.json, and updates .gitignore to cover the .config/**/*.d.mts emit byproducts.
1 parent 96be260 commit 03f6439

3 files changed

Lines changed: 34 additions & 14 deletions

File tree

.config/tsconfig.check.json

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,18 @@
11
{
22
"extends": "./tsconfig.base.json",
33
"compilerOptions": {
4-
"declarationMap": false,
4+
// DOM is needed for the WebAssembly globals used by the bundled
5+
// WASM glue (Go runtime, acorn-wasm).
6+
"lib": ["DOM", "ES2024"],
7+
// VS Code extension uses parameter properties / decorators / etc.
8+
// that emit runtime code — erasable-only would forbid them.
9+
"erasableSyntaxOnly": false,
510
"module": "esnext",
611
"moduleResolution": "bundler",
712
"noEmit": true,
813
"skipLibCheck": true,
914
"sourceMap": false,
10-
"types": ["node", "vscode"],
11-
"verbatimModuleSyntax": false
15+
"types": ["node", "vscode"]
1216
},
1317
"include": ["../src/**/*.ts", "../test/**/*.mts"],
1418
"exclude": ["**/.cache/**", "**/node_modules/**/*", "**/vendor/**/*"]

.config/tsconfig.json

Lines changed: 24 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,36 @@
11
{
2+
"extends": "./tsconfig.base.json",
23
"compilerOptions": {
4+
// DOM is needed for the WebAssembly globals used by the bundled
5+
// WASM glue (Go runtime, acorn-wasm).
6+
"lib": ["DOM", "ES2024"],
7+
// VS Code extension is published with a CommonJS entrypoint
8+
// (main = ./out/main.js) and consumed by Node, so we emit JS and
9+
// .d.ts here. The check-only tsconfig (tsconfig.check.json) keeps
10+
// noEmit on.
311
"module": "ESNext",
4-
"moduleResolution": "node",
5-
"target": "esnext",
6-
// DOM needed for WASM unfortunately
7-
"lib": ["dom", "esnext"],
12+
"moduleResolution": "bundler",
813
"outDir": "../out",
9-
"sourceMap": true,
1014
"rootDir": "../src",
11-
"skipLibCheck": true,
12-
"esModuleInterop": true,
1315
"types": ["node", "vscode"],
14-
/* Strict Type-Checking Option */
15-
"strict": true /* enable all strict type-checking options */,
16-
/* Additional Checks */
17-
"noUnusedLocals": true /* Report errors on unused locals. */
16+
// Extension ships its own type declarations.
17+
"declaration": true,
18+
// Synthetic default imports keep VS Code API + WASM glue ergonomic.
19+
"allowSyntheticDefaultImports": true,
20+
// VS Code extension uses parameter properties / decorators / etc.
21+
// that emit runtime code — erasable-only would forbid them.
22+
"erasableSyntaxOnly": false,
23+
// Emit JS for the bundler/loader to consume.
24+
"noEmit": false,
25+
// Emit even when type errors exist so a single warning doesn't kill
26+
// a development cycle — CI gates on tsconfig.check.json separately.
27+
"noEmitOnError": false,
28+
// Source maps useful for the extension host debugger.
29+
"sourceMap": true
1830
},
1931
"typeAcquisition": {
2032
"enable": true
2133
},
34+
"include": ["../src/**/*.ts"],
2235
"exclude": ["../node_modules"]
2336
}

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,10 @@ node_modules/
88
# Local transpiled output of jsPlugin/config .mts sources.
99
.config/oxlint-plugin/**/*.mjs
1010
.config/oxlint-plugin/**/*.mjs.map
11+
.config/oxlint-plugin/**/*.d.mts
1112
.config/rolldown/**/*.mjs
1213
.config/rolldown/**/*.mjs.map
14+
.config/rolldown/**/*.d.mts
1315
.config/*.mjs
1416
.config/*.mjs.map
17+
.config/*.d.mts

0 commit comments

Comments
 (0)