Skip to content

ci(lint): do not lint per-session worktrees as source - #12

Merged
github-actions[bot] merged 1 commit into
mainfrom
ci/ignore-worktrees
Aug 16, 2026
Merged

ci(lint): do not lint per-session worktrees as source#12
github-actions[bot] merged 1 commit into
mainfrom
ci/ignore-worktrees

Conversation

@catomean

Copy link
Copy Markdown
Collaborator

npm run verify failed with 10 errors that were not in the code being verified:

.claude/worktrees/release/dist/server.js  'Response' is not defined
.claude/worktrees/release/test/core.test.js  'Request' is not defined
.claude/worktrees/release/src/react.ts  Definition for rule 'react-hooks/exhaustive-deps' was not found

ESLint's ignores patterns are anchored at the project root, so dist/** matches only the top-level dist/, not .claude/worktrees/x/dist/. Every session that works in a worktree gets its own generated output linted as source — and since verify gates the release, it blocked a publish for reasons unrelated to the package.

Adds .claude/** to ignores.

Verified both directions. A file planted at .claude/worktrees/fake/dist/server.js containing new Response(), new URL(...) and an undefined call:

  • without .claude/**: 5 errors
  • with it: clean

npm run verify: 19/19 pass.

🤖 Generated with Claude Code

ESLint ignore patterns are anchored at the project root, so 'dist/**'
does not match '.claude/worktrees/x/dist/**'. Any session working in a
worktree therefore had its own generated output linted as source:
verify reported 10 errors ('Response' is not defined in dist/server.js,
'URL' is not defined in a test) none of which were in the checkout being
tested. It blocked a release attempt.

Verified both directions: a file planted under .claude/ produces 5 errors
without this entry and none with it.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@github-actions
github-actions Bot merged commit 14591db into main Aug 16, 2026
1 check passed
@github-actions
github-actions Bot deleted the ci/ignore-worktrees branch August 16, 2026 13:24
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