Skip to content

fix: add --no-error-on-unmatched-pattern to lint-staged commands - #49

Merged
bhouston merged 1 commit into
mainfrom
fix/48-lint-staged-unmatched-pattern
Sep 28, 2026
Merged

bhouston merged 1 commit into
mainfrom
fix/48-lint-staged-unmatched-pattern

Conversation

@bhouston

Copy link
Copy Markdown
Owner

Summary

  • Add --no-error-on-unmatched-pattern to the oxfmt and oxlint --fix invocations in the lint-staged block of package.json, matching the pattern used in material-fidelity / material-fidelity-avif.

Why

When the only staged file matching a lint-staged glob is one that oxfmt/oxlint ignores (e.g. a generated file like routeTree.gen.ts), both tools see zero matched files after applying their ignore rules and exit non-zero, failing the commit even though nothing is wrong.

Closes #48

Test plan

  • Verified the pre-commit hook ran oxfmt --no-error-on-unmatched-pattern successfully on this branch's own commit
  • CI green

Prevents commit failures when the only staged JS/TS/etc file matched by the
lint-staged glob is one oxfmt/oxlint ignores (e.g. generated files like
routeTree.gen.ts).

Refs #48
@bhouston
bhouston merged commit 47db211 into main Sep 28, 2026
2 checks passed
@bhouston
bhouston deleted the fix/48-lint-staged-unmatched-pattern branch September 28, 2026 13:17
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.

fix: lint-staged fails commit when only staged file is ignored

1 participant