chore(lint): ignore .claude/worktrees, the way .stryker-tmp already is - #117
Merged
Merged
Conversation
Claude Code checks agent worktrees out under .claude/worktrees — full copies of the repo. They are ignored by git via .git/info/exclude, but ESLint 9's flat config does not read git's ignore files, so every finding repeats once per worktree. Observed on main today: 246 problems, all 628 reported files under .claude/worktrees, from one worktree. CI starts from a clean checkout, so the failure is invisible where it would be caught and constant where it is most annoying, and it buries any genuine finding. Exactly the mechanism fixed for .stryker-tmp in #92, so it goes in the same list with the same reasoning. pnpm lint returns to clean.
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.
Mechanism
Claude Code checks agent worktrees out under
.claude/worktrees/— full copies of the repo. They are ignored by git (via.git/info/exclude), but ESLint 9's flat config does not read git's ignore files, so every finding in the tree repeats once per worktree.Observed on
maintoday with a single worktree present:All 628 reported files were under
.claude/worktrees/. Zero were real.Why it matters
CI starts from a clean checkout, so this is invisible where it would be caught and constant where it is most annoying — the worst way round. It also buries genuine findings:
pnpm linthad just been brought to zero problems in #105, and a single worktree took it back to 246.It also breaks the local workflow CLAUDE.md documents, where
pnpm lintand the pre-commit hook are the fast feedback layer before CI.Fix
One entry in
globalIgnores, next to.stryker-tmp/**— this is exactly the mechanism fixed for Stryker's sandbox in #92, so it gets the same treatment and the same reasoning in the comment.pnpm lintreturns to clean. Typecheck unaffected.🤖 Generated with Claude Code