From 444b853248b3d3eaae21bf70805c65ac11306754 Mon Sep 17 00:00:00 2001 From: Tyler Vigario Date: Tue, 16 Jun 2026 19:53:25 -0700 Subject: [PATCH 1/2] chore: tune VS Code workspace config and scope editor type-checking - 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) --- .gitignore | 2 -- .vscode/launch.json | 13 +++++++++++++ .vscode/settings.json | 15 ++++++++------- src/tsconfig.json | 12 ++++++++++++ tsconfig.json | 4 +++- 5 files changed, 36 insertions(+), 10 deletions(-) create mode 100644 src/tsconfig.json diff --git a/.gitignore b/.gitignore index 639d0f7f..b312110f 100644 --- a/.gitignore +++ b/.gitignore @@ -47,9 +47,7 @@ Thumbs.db .vscode/* !.vscode/extensions.json !.vscode/settings.json -!.vscode/tasks.json !.vscode/launch.json -!.vscode/debug-converter.js *.swp *.swo diff --git a/.vscode/launch.json b/.vscode/launch.json index a2012823..dd946bd2 100644 --- a/.vscode/launch.json +++ b/.vscode/launch.json @@ -28,6 +28,19 @@ "NODE_ENV": "test" } }, + { + "type": "node", + "request": "launch", + "name": "Debug Current Test File (AVA)", + "skipFiles": ["/**"], + "program": "${workspaceFolder}/node_modules/ava/entrypoints/cli.js", + "args": ["${file}", "--serial", "--concurrency=1"], + "console": "integratedTerminal", + "cwd": "${workspaceFolder}", + "env": { + "NODE_ENV": "test" + } + }, { "type": "node", "request": "launch", diff --git a/.vscode/settings.json b/.vscode/settings.json index 67d5c078..2e8a2fff 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -6,7 +6,7 @@ "files.insertFinalNewline": true, "files.eol": "\n", // LF line endings (matches .editorconfig) - // ESLint (flat config, neostandard style) is the project linter + // ESLint flat config (ESLint 10) is the project linter "eslint.useFlatConfig": true, "javascript.preferences.quoteStyle": "single", @@ -16,21 +16,22 @@ "source.fixAll.eslint": "explicit" }, - // Markdown Linting (Project Standard - matches .markdownlint.mjs) - "markdownlint.config": { - "line-length": false, // MD013: Allow long lines (links, tables, code examples) - "MD013": false // Deprecated alias for backward compatibility - }, + // Markdown linting follows the project's .markdownlint.mjs / .markdownlint-cli2.mjs, + // which the extension auto-discovers — no inline mirror to drift out of sync. - // TypeScript - Use JSDoc for type checking + // TypeScript - JSDoc type checking; pin the editor to the workspace TypeScript + // (node_modules) so in-editor checks use the same tsc version as CI. "javascript.validate.enable": true, "typescript.validate.enable": true, + "typescript.tsdk": "node_modules/typescript/lib", + "typescript.enablePromptUseWorkspaceTsdk": true, // Project Build Artifacts & Performance "search.exclude": { "**/node_modules": true, "**/coverage": true, "**/dist": true, + "**/*.d.ts": true, "**/.nyc_output": true, "**/package-lock.json": true, "**/.claude": true, diff --git a/src/tsconfig.json b/src/tsconfig.json new file mode 100644 index 00000000..99e615d4 --- /dev/null +++ b/src/tsconfig.json @@ -0,0 +1,12 @@ +{ + // Editor-only: gives src/ strict checkJs in VS Code so in-editor type errors + // match what CI enforces (tsconfig.build.json type-checks src/ with checkJs). + // The root tsconfig.json keeps checkJs off and covers test/scripts/bench, + // which CI does not type-check — so without this file the editor would either + // miss src/ errors or flood those dirs with phantom ones. CI does not use this. + "extends": "../tsconfig.json", + "compilerOptions": { + "checkJs": true + }, + "include": ["**/*.js"] +} diff --git a/tsconfig.json b/tsconfig.json index c4b1a987..e427356e 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -17,8 +17,10 @@ "types": ["node"] }, + // src/ is type-checked by src/tsconfig.json (checkJs) to match CI; this root + // config covers the rest for editor IntelliSense without checkJs (CI does not + // type-check test/scripts/bench, so flagging them in-editor would be phantom). "include": [ - "src/**/*.js", "test/**/*.js", "scripts/**/*.js", "bench/**/*.js" From 423803c72ce3d7b71351e0b9081121a5012d80f2 Mon Sep 17 00:00:00 2001 From: Tyler Vigario Date: Tue, 16 Jun 2026 20:01:50 -0700 Subject: [PATCH 2/2] chore(types): type-check all of src/ recursively in CI MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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) --- src/tsconfig.json | 6 ++++-- tsconfig.build.json | 2 +- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/src/tsconfig.json b/src/tsconfig.json index 99e615d4..33b8bbb2 100644 --- a/src/tsconfig.json +++ b/src/tsconfig.json @@ -1,6 +1,8 @@ { - // Editor-only: gives src/ strict checkJs in VS Code so in-editor type errors - // match what CI enforces (tsconfig.build.json type-checks src/ with checkJs). + // Editor-only: type-checks all of src/ with checkJs in VS Code, matching what + // CI enforces (tsconfig.build.json checks src/**/*.js with checkJs). The + // include below is recursive (**/*.js) on purpose — all of src/ is meant to be + // checkJs-clean, so any new file or subdir is checked here AND gated by CI. // The root tsconfig.json keeps checkJs off and covers test/scripts/bench, // which CI does not type-check — so without this file the editor would either // miss src/ errors or flood those dirs with phantom ones. CI does not use this. diff --git a/tsconfig.build.json b/tsconfig.build.json index ca07c35b..88ab5831 100644 --- a/tsconfig.build.json +++ b/tsconfig.build.json @@ -9,6 +9,6 @@ "outDir": ".", "rootDir": "." }, - "include": ["src/*.js", "src/utils/*.js"], + "include": ["src/**/*.js"], "exclude": ["node_modules", "dist", "test", "bench", "scripts"] }