chore: exclude git worktrees from tooling#4286
Merged
Merged
Conversation
Worktrees created under `.claude/worktrees/` are full nested checkouts. vitest, oxlint, and oxfmt all recursed into them, causing specs to run twice (with potential fixture path collisions) and duplicate source to be linted/format-checked. Add `**/.claude/**` exclusions to vitest, oxlint, and oxfmt configs. Other tooling (markdownlint, lint-roller, knip, build scripts, the CI artifact upload, and `git status`) already ignore the worktree path and needed no change. Co-Authored-By: Claude <svc-devxp-claude@slack-corp.com>
MarshallOfSound
approved these changes
Jun 9, 2026
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.
Summary
Enables using git worktrees in this repo without breaking things in the root repository. Worktrees created under
.claude/worktrees/are full nested checkouts, and several CI tools recursed into them.I built a fake worktree under
.claude/worktrees/and ran each CI tool against it to determine which actually descend in (rather than inferring from glob rules). Three tools needed exclusions:include: ['**/spec/**/*.spec.ts']matched specs inside the worktree → every spec runs twice, with potential fixture-path collisions.claudenot inignorePatterns→ lints duplicate source.claudenot inignorePatterns→ format-checks duplicate sourceEach now excludes
**/.claude/**.Already safe (verified, no change needed)
markdownlint-cli2 + lint-roller (their
**/*.mdglobs don't descend into dot-directories), knip (scoped topackage.jsonworkspaces), build tooling (getPackageInfoonly readspackages/), the CI artifact upload (packages/*/*/dist/*), andgit status(git auto-excludes registered worktrees).Notes
.claudeentry does not work for oxlint/oxfmt — unlikenode_modules, a hidden directory needs an explicit glob (**/.claude/**). Verified the glob form works..claudeis tracked in git, so excluding it wholesale is safe..claude/worktrees/. Worktrees placed elsewhere in the tree would need their own exclusions.Test plan
.claude/worktrees/and confirmed vitest/oxlint/oxfmt each picked up the duplicate files before the fix🤖 Generated with Claude Code