What version of Oxlint are you using?
1.60.0
What command did you run?
The raw oxlint CLI reproduces it:
oxlint .
oxlint src
oxlint --no-ignore src
In the affected environment, explicit file paths work:
oxlint src/lib/durable-chat/agent-core-bridge.ts
What does your .oxlintrc.json (or oxlint.config.ts) config file look like?
Not using one for the raw repro.
This also reproduces without Vite+ in the loop, and --no-ignore still reports 0 files.
What happened?
I think this is another instance of parent .gitignore bleed across the repo's own .git boundary, but with a very common modern path layout: Cursor worktrees under ~/.cursor/worktrees/....
My repo lives at a path like:
/home/ec2-user/.cursor/worktrees/pr88-lints-3e7a1c5d/indicator-flow-e20202d68d13
and the ancestor directory /home/ec2-user/.cursor/.gitignore contains:
# Ignore everything in .cursor
*
# ...allowlist only a few subtrees like projects/, plugins/, skills/, etc.
Notably, it does not allowlist worktrees/.
Repro
- Put a git repo (or git worktree) under a parent directory that has a
.gitignore above the repo root.
- Make that parent
.gitignore ignore everything by default, e.g.:
- Ensure the repo itself has its own
.git boundary.
- Run:
Observed behavior
Oxlint reports 0 matched files:
No files found to lint. Please check your paths and ignore patterns.
Finished in 8ms on 0 files with 93 rules using 4 threads.
But in the exact same checkout:
- explicit file paths work
- shell-expanded file lists work
- the same repo copied outside
~/.cursor/... works
I verified all three locally:
oxlint /home/ec2-user/.cursor/worktrees/.../apps/web/src -> 0 files
oxlint /home/ec2-user/.cursor/worktrees/.../apps/web/src/lib/durable-chat/agent-core-bridge.ts -> works
oxlint /home/ec2-user/indicator-flow/apps/web/src -> works
--no-ignore did not fix it in this environment.
Why I think this is the same root cause family as the nested-repo / home-.gitignore bugs
I traced this from Vite+ down to raw oxlint, and it looks consistent with these existing reports / PRs:
In particular, current apps/oxlint/src/walk.rs on main still shows:
.git_ignore(true)
.hidden(false)
.require_git(false)
and the nearby test comment says:
// Without .git_ignore(true) and .require_git(false), both files would be found
That seems consistent with Oxlint still reading ignore files above the repo's own .git boundary.
Why this matters
This breaks oxlint . / oxlint src in Cursor worktrees even though the worktree itself is a normal git checkout. Cursor stores those worktrees under ~/.cursor/worktrees/..., and its top-level .cursor/.gitignore ignores almost everything there.
Because explicit file paths still work, this looks like a directory walker / parent ignore discovery problem rather than a parsing or config-loading problem.
If helpful, I can also provide a minimal synthetic repro that uses:
- an ancestor directory with
.gitignore containing *
- a nested repo/worktree below it with its own
.git
oxlint src returning 0 files while oxlint src/file.ts works
What version of Oxlint are you using?
1.60.0
What command did you run?
The raw
oxlintCLI reproduces it:oxlint . oxlint src oxlint --no-ignore srcIn the affected environment, explicit file paths work:
What does your
.oxlintrc.json(oroxlint.config.ts) config file look like?Not using one for the raw repro.
This also reproduces without Vite+ in the loop, and
--no-ignorestill reports 0 files.What happened?
I think this is another instance of parent
.gitignorebleed across the repo's own.gitboundary, but with a very common modern path layout: Cursor worktrees under~/.cursor/worktrees/....My repo lives at a path like:
and the ancestor directory
/home/ec2-user/.cursor/.gitignorecontains:Notably, it does not allowlist
worktrees/.Repro
.gitignoreabove the repo root..gitignoreignore everything by default, e.g.:*.gitboundary.Observed behavior
Oxlint reports 0 matched files:
But in the exact same checkout:
~/.cursor/...worksI verified all three locally:
oxlint /home/ec2-user/.cursor/worktrees/.../apps/web/src-> 0 filesoxlint /home/ec2-user/.cursor/worktrees/.../apps/web/src/lib/durable-chat/agent-core-bridge.ts-> worksoxlint /home/ec2-user/indicator-flow/apps/web/src-> works--no-ignoredid not fix it in this environment.Why I think this is the same root cause family as the nested-repo / home-.gitignore bugs
I traced this from Vite+ down to raw
oxlint, and it looks consistent with these existing reports / PRs:.gitignorerules from parent directories above the project's.gitroot #21007In particular, current
apps/oxlint/src/walk.rsonmainstill shows:and the nearby test comment says:
// Without .git_ignore(true) and .require_git(false), both files would be foundThat seems consistent with Oxlint still reading ignore files above the repo's own
.gitboundary.Why this matters
This breaks
oxlint ./oxlint srcin Cursor worktrees even though the worktree itself is a normal git checkout. Cursor stores those worktrees under~/.cursor/worktrees/..., and its top-level.cursor/.gitignoreignores almost everything there.Because explicit file paths still work, this looks like a directory walker / parent ignore discovery problem rather than a parsing or config-loading problem.
If helpful, I can also provide a minimal synthetic repro that uses:
.gitignorecontaining*.gitoxlint srcreturning 0 files whileoxlint src/file.tsworks