From 5d05f3c8521f385dc9dcfb828472df8414cc4423 Mon Sep 17 00:00:00 2001 From: Ben Houston Date: Mon, 28 Sep 2026 08:56:18 -0400 Subject: [PATCH] fix: skip lint-staged failure when only ignored files are staged Add --no-error-on-unmatched-pattern to the oxfmt and oxlint --fix invocations in the lint-staged config so staging only a generated or otherwise ignored file (e.g. routeTree.gen.ts) no longer fails the commit when both tools end up with zero matched files. Refs #77 --- package.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/package.json b/package.json index e07f7c3..2888c08 100644 --- a/package.json +++ b/package.json @@ -52,10 +52,10 @@ }, "lint-staged": { "*.{js,jsx,ts,tsx,mjs,cjs}": [ - "oxfmt", - "oxlint --fix" + "oxfmt --no-error-on-unmatched-pattern", + "oxlint --fix --no-error-on-unmatched-pattern" ], - "*.{json,jsonc,md,mdx,css,html,yml,yaml}": "oxfmt" + "*.{json,jsonc,md,mdx,css,html,yml,yaml}": "oxfmt --no-error-on-unmatched-pattern" }, "size-limit": [ {