Skip to content

chore: don't fail lint-staged when oxlint ignores every staged file - #1522

Merged
hi-ogawa merged 1 commit into
mainfrom
lint-staged-oxlint
Oct 20, 2026
Merged

hi-ogawa merged 1 commit into
mainfrom
lint-staged-oxlint

Conversation

@hi-ogawa

Copy link
Copy Markdown
Contributor

Since the Oxlint migration, a commit that stages only packages/plugin-rsc sources fails the pre-commit hook with "No files found to lint". Oxlint ignores packages/plugin-rsc/**, and it exits with an error by default when every file it receives is ignored. ESLint only printed a warning in the same case, so these commits used to go through.

This adds --no-error-on-unmatched-pattern to the lint-staged oxlint --fix entries, the same flag the oxfmt entry already uses. Files that oxlint doesn't ignore are still linted and fixed as before.

`oxlint.config.ts` ignores `packages/plugin-rsc/**`, so a commit that stages only plugin-rsc sources passes oxlint no files and the pre-commit hook fails with "No files found to lint". ESLint only warned in that case.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@hi-ogawa
hi-ogawa marked this pull request as ready for review October 20, 2026 03:17
@hi-ogawa
hi-ogawa merged commit d2fd53b into main Oct 20, 2026
13 of 14 checks passed
@hi-ogawa
hi-ogawa deleted the lint-staged-oxlint branch October 20, 2026 03:21
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.

1 participant