Skip to content

Commit 1f04656

Browse files
committed
build: tolerate ignored files in nano-staged hooks
`oxfmt`/`oxlint` exit with an error when every staged file is ignored by the formatter/linter config, which breaks commits that only touch `test/e2e/fixtures/**`. Pass `--no-error-on-unmatched-pattern` to both so fixture-only commits no longer fail the pre-commit hook.
1 parent 52d27eb commit 1f04656

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -42,10 +42,10 @@
4242
},
4343
"nano-staged": {
4444
"*.{ts,tsx,js,jsx}": [
45-
"oxfmt --write",
46-
"oxlint -c .oxlintrc.json"
45+
"oxfmt --write --no-error-on-unmatched-pattern",
46+
"oxlint -c .oxlintrc.json --no-error-on-unmatched-pattern"
4747
],
48-
"*.{md,json,css}": "oxfmt --write"
48+
"*.{md,json,css}": "oxfmt --write --no-error-on-unmatched-pattern"
4949
},
5050
"engines": {
5151
"bun": ">=1.3.10"

0 commit comments

Comments
 (0)