From a5a04bddc789f6cea4683d4ee3f801ff76d3f967 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=A9my=20Dieuze?= Date: Tue, 1 Sep 2026 10:46:15 +0200 Subject: [PATCH] fix: let the pre-commit hook handle generated-only commits MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The Generate SDK workflow reached the commit step for the first time since the codegen was repaired, and died there: oxlint --fix No files found to lint. Please check your paths and ignore patterns. husky - pre-commit script failed (code 1) lint-staged hands oxlint the 5 staged files, all under src/client/, which .oxlintrc.json lists in ignorePatterns. oxlint filters every path out and then exits 1 on the empty set, so any commit touching only the generated client is impossible — which is exactly the shape of every SDK-update commit. Latent since the eslint -> oxlint move; unreachable until the codegen ran again. --no-error-on-unmatched-pattern makes the empty set a no-op. Verified it does not mask real findings: a file with an unused variable still exits 1, and 'pnpm run lint' (oxlint src test) keeps the strict behaviour for CI. --- .lintstagedrc.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.lintstagedrc.json b/.lintstagedrc.json index 99f8edc..d56c2c8 100644 --- a/.lintstagedrc.json +++ b/.lintstagedrc.json @@ -1,4 +1,4 @@ { - "*.{ts,tsx,js,jsx}": ["oxlint --fix", "prettier --write"], + "*.{ts,tsx,js,jsx}": ["oxlint --fix --no-error-on-unmatched-pattern", "prettier --write"], "*.{json,md,yml,yaml}": ["prettier --write"] }