Skip to content

chore(lint): ignore .claude/worktrees, the way .stryker-tmp already is - #117

Merged
KenTaniguchi-R merged 1 commit into
mainfrom
fix/eslint-ignore-claude-worktrees
Aug 30, 2026
Merged

chore(lint): ignore .claude/worktrees, the way .stryker-tmp already is#117
KenTaniguchi-R merged 1 commit into
mainfrom
fix/eslint-ignore-claude-worktrees

Conversation

@KenTaniguchi-R

Copy link
Copy Markdown
Owner

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 main today with a single worktree present:

$ pnpm lint
✖ 246 problems (119 errors, 127 warnings)

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 lint had 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 lint and 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 lint returns to clean. Typecheck unaffected.

🤖 Generated with Claude Code

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.
@KenTaniguchi-R
KenTaniguchi-R merged commit b982902 into main Aug 30, 2026
5 checks passed
@KenTaniguchi-R
KenTaniguchi-R deleted the fix/eslint-ignore-claude-worktrees branch August 30, 2026 01:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant