Skip to content

Mark the ESLint config as root so nested worktrees can lint - #476

Merged
lurkshark merged 1 commit into
mainfrom
lurkshark/customer-tickets-p0cli-3bd4d8
Nov 11, 2026
Merged

lurkshark merged 1 commit into
mainfrom
lurkshark/customer-tickets-p0cli-3bd4d8

Conversation

@lurkshark

Copy link
Copy Markdown
Contributor

Problem

ESLint fails in any git worktree created inside this checkout, for example one under .claude/worktrees/:

ESLint couldn't determine the plugin "notice" uniquely.

ESLint keeps looking for config files in parent directories until it finds one with root: true. Our .eslintrc.js doesn't set it, so a nested worktree loads both its own .eslintrc.js and the parent checkout's. Each one resolves eslint-plugin-notice from its own node_modules, and ESLint won't choose between the two copies. Because the lint-staged pre-commit hook runs ESLint, committing from a nested worktree fails too.

Status: N/A

Change

Sets root: true in .eslintrc.js, so ESLint stops at this repository's config. Lint rules are unchanged: no config above the repository root was meant to apply.

Check off any of the following areas of code that are modified:

  • authentication / authorization
  • workflow
  • APIs
  • lifecycle SDK
  • datastore abstractions
  • none of the above

Type of Change

  • Bug fix

Validation

  • Testing: in a worktree nested inside the main checkout, npx eslint src/commands/allow.ts failed with the error above before this change and passes after it. yarn lint (Prettier, ESLint, tsc) and the lint-staged pre-commit hook pass.
  • Blast radius: lint configuration only. Contributors and CI that lint from a standalone checkout behave the same as before.
  • Risks & mitigations: none.

Rollout / rollback

N/A

ESLint keeps looking for config files in parent directories until one
sets root: true. A git worktree created inside the checkout (for example
under .claude/worktrees/) picks up both its own .eslintrc.js and the
parent checkout's, and each loads its own copy of eslint-plugin-notice.
ESLint then refuses to run ("couldn't determine the plugin notice
uniquely"), which also fails the lint-staged pre-commit hook.
@lurkshark
lurkshark merged commit 24afbf0 into main Nov 11, 2026
4 checks passed
@lurkshark
lurkshark deleted the lurkshark/customer-tickets-p0cli-3bd4d8 branch November 11, 2026 02:16
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.

2 participants