chore(devex): stop false-positive LSP diagnostics for .claude/worktrees files (PP-8x3c)#1582
Open
timothyfroehlich wants to merge 1 commit into
Open
chore(devex): stop false-positive LSP diagnostics for .claude/worktrees files (PP-8x3c)#1582timothyfroehlich wants to merge 1 commit into
timothyfroehlich wants to merge 1 commit into
Conversation
…scope (PP-8x3c) Working in the main worktree, the editor's tsserver surfaced false-positive diagnostics (unresolved ~/ aliases, missing jest-dom matchers, implicit-any catch params) for files living in linked worktrees under .claude/worktrees/**. Those are full checkouts whose own `pnpm run check` is green; the diagnostics were pure cross-worktree noise and once nearly misled a lead agent into "fixing" code that wasn't broken. - .vscode/settings.json: add **/.claude/worktrees to files.exclude, search.exclude, and files.watcherExclude. files.exclude is the load-bearing change — tsserver won't analyze files hidden from the workspace, so the spurious diagnostics stop. (Batch `tsc` already skipped the dot-dir, so this was never an `tsc -p` problem.) - tsconfig.json: add .claude/worktrees/** to exclude as explicit intent / belt-and-suspenders for any tool that expands includes into dot-dirs. Verified the tsc program is byte-for-byte identical (401 files) before and after — zero real src files dropped. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
When working in the main checkout, the editor's tsserver surfaced false-positive TypeScript diagnostics for files living in linked git worktrees under
.claude/worktrees/**— unresolved~/path aliases, missing@testing-library/jest-dommatchers (toBeInTheDocument/toHaveAttribute), and implicit-anyon pre-existing catch params.Those worktrees are full, git-ignored, machine-local checkouts whose own
pnpm run checkis green. The diagnostics were pure cross-worktree noise — and during PP-qk7s orchestration they nearly misled a lead agent into "fixing" code that wasn't actually broken.Root cause
This was never a batch-
tscproblem: TypeScript's wildcard walker already skips dot-directories (.claude), sotsc -p tsconfig.json --listFilesOnlyincludes zero worktree files. The noise came from the editor's tsserver, which discovers/opens files in the workspace tree (including under.claude/worktrees) and analyzes them with the wrong project config.Fix
.vscode/settings.json— add**/.claude/worktreestofiles.exclude,search.exclude, andfiles.watcherExclude.files.excludeis the load-bearing change: tsserver won't analyze files hidden from the workspace, so the spurious diagnostics stop. This mirrors the existing.claude/recycle_binexclusions.tsconfig.json— add.claude/worktrees/**/*toexcludeas explicit intent / belt-and-suspenders for any tool that expandsincludeglobs into dot-dirs differently.Verification
tscprogram is identical before and after the tsconfig change (401 files in the worktree, byte-for-byte same file list) — zero realsrcfiles dropped.pnpm run checkgreen: types, lint, format, 1317 unit tests, 70 python tests.Closes PP-8x3c.
🤖 Generated with Claude Code