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..33b8bbb2 --- /dev/null +++ b/src/tsconfig.json @@ -0,0 +1,14 @@ +{ + // 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. + "extends": "../tsconfig.json", + "compilerOptions": { + "checkJs": true + }, + "include": ["**/*.js"] +} 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"] } 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"