From f2940d568fed5449b6de1b910d8487d12f780789 Mon Sep 17 00:00:00 2001 From: Mao Nakamoto Date: Sun, 16 Aug 2026 15:24:19 +0200 Subject: [PATCH] ci(lint): do not lint per-session worktrees as source 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 --- eslint.config.mjs | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/eslint.config.mjs b/eslint.config.mjs index 157e715..c79c0bd 100644 --- a/eslint.config.mjs +++ b/eslint.config.mjs @@ -11,7 +11,13 @@ export default tseslint.config( { // dist/ is generated by `tsc`; examples/ is a standalone Next.js app with // its own toolchain and is not part of this package's published `files`. - ignores: ['dist/**', 'examples/**', 'node_modules/**'], + // + // .claude/ holds per-session git worktrees — each a full copy of this repo, + // generated dist/ included. These patterns are anchored at the project root, + // so `dist/**` does NOT match `.claude/worktrees/x/dist/**`: without this + // entry a worktree is linted as source and reports errors in files that are + // not part of the checkout being tested. + ignores: ['dist/**', 'examples/**', 'node_modules/**', '.claude/**'], }, js.configs.recommended, ...tseslint.configs.recommended,