Skip to content

eslint.config.mjs does not ignore .claude/, so anything kept there fails npm run lint with parser-project errors #760

Description

@latekvo

What happens

npm run lint reports errors for files under .claude/, a directory that is git-ignored (.gitignore:54) and holds no project sources.

Every TypeScript file found there fails with a parsing error, because nothing under .claude/ belongs to any tsconfig referenced by parserOptions.project:

0:0  error  Parsing error: "parserOptions.project" has been provided for @typescript-eslint/parser.
The file was not found in any of the provided project(s): .claude/<path>

Why

ESLint's flat config does not read .gitignore. It honours only its own ignores array, and the array in eslint.config.mjs (lines 11-28) does not list .claude/.

The comment directly above that array states it "Mirrors the ignores in .prettierignore + .gitignore". Since .gitignore contains .claude/, the array does not currently match its own stated intent.

Prettier is not affected and needs no change: since 3.0 its default --ignore-path includes .gitignore, so it already skips the directory. Verified on 3.8.5 — a whole-repo prettier --check . passes over a badly formatted file under .claude/, and flags it only when forced with --ignore-path .prettierignore.

Reproduction

mkdir -p .claude/scratch
printf 'const   unusedVar:any=1\n' > .claude/scratch/bad.ts
npx eslint .          # .claude/scratch/bad.ts is reported
rm -rf .claude/scratch

Impact

.claude/worktrees/ is a natural place to keep git worktrees, and each worktree is a complete copy of the repo. On a checkout with three worktrees there, npm run lint reported 1008 errors, all of them from those copies and none from argent's own sources. npm run lint runs with --max-warnings 0, so the local lint gate fails and the real output is buried.

CI is unaffected: .claude/ is not tracked, so a fresh checkout never contains it. This is a local developer-experience problem only.

Suggested fix

Add ".claude/" to the ignores array in eslint.config.mjs.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    b:minorBug that either affects a small cohort of users and affects a minor feature.bugSomething isn't working

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions