chore: tune VS Code workspace config and scope editor type-checking#405
Conversation
- fix stale "neostandard" comment in settings.json (dropped for ESLint 10) - drop the inline markdownlint mirror; the extension auto-discovers .markdownlint.mjs / .markdownlint-cli2.mjs, so the duplicate could drift - exclude generated **/*.d.ts from editor search - pin the editor to the workspace TypeScript (typescript.tsdk) so in-editor checks use the same tsc version as CI - add a "Debug Current Test File (AVA)" launch config for per-file debugging - remove dead .gitignore allow-list entries (tasks.json, debug-converter.js) that referenced nonexistent files - add src/tsconfig.json so the editor type-checks src/ with checkJs (matching CI) without flagging test/scripts/bench, which CI does not type-check Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
There was a problem hiding this comment.
Pull request overview
This PR refines the repository’s VS Code workspace configuration and editor-only type-checking setup, aiming to align in-editor feedback with what CI actually enforces while reducing editor noise.
Changes:
- Scoped editor type-checking by removing
src/from the roottsconfig.jsoninclude list and introducingsrc/tsconfig.jsonwithcheckJs: true. - Updated
.vscode/settings.jsonto pin the workspace TypeScript, remove redundant inline markdownlint settings, and exclude generated*.d.tsfrom editor search. - Added an AVA “debug current test file” launch configuration and cleaned up
.gitignoreallow-list entries for nonexistent VS Code files.
Reviewed changes
Copilot reviewed 3 out of 5 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| tsconfig.json | Stops the root editor config from including src/, keeping checkJs off for non-CI-gated directories. |
| src/tsconfig.json | New editor-only config enabling checkJs for src/ to better match CI’s strictness. |
| .vscode/settings.json | Pins workspace TS SDK, removes redundant markdownlint mirror config, and improves search exclusions. |
| .vscode/launch.json | Adds a per-file AVA debug configuration for faster focused debugging. |
| .gitignore | Removes allow-list exceptions for VS Code files that do not exist in the repo. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| "compilerOptions": { | ||
| "checkJs": true | ||
| }, | ||
| "include": ["**/*.js"] |
There was a problem hiding this comment.
Good catch on the scope mismatch — but we resolved it in the opposite direction (the intent is that all of src/ stays checkJs-clean, not just CI's current subset).
Rather than narrowing this editor config down to CI's set, I broadened CI up to match the editor: tsconfig.build.json now includes src/**/*.js (423803c). Both are recursive now, so any new file or subdirectory under src/ is type-checked in the editor and gated by CI — enforced, not phantom drift. Behavior-neutral today: src/*.js + src/utils/*.js and src/**/*.js resolve to the same 80 files (72 top-level + 8 in utils/).
tsconfig.build.json only included src/*.js and src/utils/*.js, so a future file under a new src/ subdirectory would silently escape the checkJs gate. Broaden the include to src/**/*.js so all of src/ is enforced checkJs-clean, matching the editor's src/tsconfig.json (**/*.js). Behavior-neutral today — the two patterns resolve to the same 80 files (72 top-level + 8 in utils/). Resolves the PR #405 review note about editor/CI scope drift by aligning CI up to the editor's recursive scope, rather than narrowing the editor down: the intent is that all of src/ stays checkJs-compatible, so both should gate it. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
What
Quality-of-life pass on the shared
.vscode/workspace config and editor type-checking, from a review of the folder. All editor/DX — no runtime or published-artifact changes.Changes
settings.jsoncalled the linter "neostandard style"; neostandard was dropped for ESLint 10. Corrected.settings.jsonhand-duplicatedMD013: false. The extension auto-discovers.markdownlint.mjs/.markdownlint-cli2.mjs(which already set it), so the inline copy was redundant and could drift. Single source of truth now.**/*.d.ts(80 files land insrc/after a build) from editor search.typescript.tsdk+ the use-workspace-version prompt, so in-editor checks use the project'stsc(matches CI), not VS Code's bundled one.Debug Current Test File (AVA)launch config; the existing one runs the whole suite + a type build..gitignorecleanup — removed two allow-list entries (tasks.json,debug-converter.js) that pointed at nonexistent files.src/tsconfig.jsongivessrc/strictcheckJsin the editor (the set CI actually type-checks viatsconfig.build.json), while the root config keepscheckJsoff fortest//scripts//bench/. A naivecheckJs: trueon the root would have flooded the editor with 132 phantom errors in those dirs — errors CI never gates — so this scopes it cleanly to zero phantoms.Verification
tsc -p src/tsconfig.json --noEmit→ 0 errors (src clean under checkJs)tsc -p tsconfig.json --noEmit→ 0 errors (test/scripts/bench, checkJs off)npm test→ 453 passing (CI type-check path viatsconfig.build.jsonunaffected)getLanguageCodes) filters to.js, sosrc/tsconfig.jsonis ignored by the build/tests🤖 Generated with Claude Code