Problem
pnpm lint currently reports 20 ESLint errors — every one of them comes from generated files in .claude/worktrees/<branch>/.next/ directories created by Claude Code's worktree feature. None of them are real source files; they are throwaway build artifacts in temporary worktrees that get cleaned up automatically. The noise hides any real lint regressions.
Evidence
pnpm lint 2>&1 | head -30 shows errors only under .claude/worktrees/.../.next/.
pnpm exec eslint src --max-warnings 0 is clean — confirming the issue is purely the worktree artifacts.
Proposed approach
- Open
eslint.config.mjs (flat config — top-level ignores array).
- Add
.claude/worktrees/** (and **/.next/** for safety) to the global ignores:
{
ignores: [
\".claude/worktrees/**\",
\"**/.next/**\",
\"node_modules/**\",
\"dist/**\",
// ...existing ignores
],
},
- Confirm
pnpm lint returns zero errors after the change.
- Update
.gitignore if .claude/worktrees is not already covered (it should be, but verify).
Acceptance criteria
Verification
pnpm lint → exit 0, zero errors.
- Create an obvious lint error in
src/lib/utils.ts (e.g. unused variable) → pnpm lint reports it. Revert.
- Re-run
pnpm lint → clean again.
Problem
pnpm lintcurrently reports 20 ESLint errors — every one of them comes from generated files in.claude/worktrees/<branch>/.next/directories created by Claude Code's worktree feature. None of them are real source files; they are throwaway build artifacts in temporary worktrees that get cleaned up automatically. The noise hides any real lint regressions.Evidence
pnpm lint 2>&1 | head -30shows errors only under.claude/worktrees/.../.next/.pnpm exec eslint src --max-warnings 0is clean — confirming the issue is purely the worktree artifacts.Proposed approach
eslint.config.mjs(flat config — top-levelignoresarray)..claude/worktrees/**(and**/.next/**for safety) to the globalignores:pnpm lintreturns zero errors after the change..gitignoreif.claude/worktreesis not already covered (it should be, but verify).Acceptance criteria
pnpm lintexits 0 with no errors and no warnings.pnpm exec eslint src --max-warnings 0continues to be clean..claude/worktrees/directory is git-ignored (confirm withgit check-ignore).pnpm typecheckstill passes.Verification
pnpm lint→ exit 0, zero errors.src/lib/utils.ts(e.g. unused variable) →pnpm lintreports it. Revert.pnpm lint→ clean again.