From 91f46ff3c8e334a3cd7469ed6b32a569203c36e1 Mon Sep 17 00:00:00 2001 From: Lukas Date: Wed, 5 Aug 2026 14:10:31 +0200 Subject: [PATCH] Fix oxlint gate invocations that silently linted nothing MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Two separate defects, both of which made the gate pass without checking: lefthook ran `pnpm oxlint -- --deny warnings`. pnpm forwards arguments after `--` to the script, so oxlint received its own `--` terminator and read the rest as file paths — the pre-commit oxlint job linted 0 files. The check script used `--deny warnings` rather than `--deny-warnings`. `--deny` takes a rule or category and `warnings` is neither, so it was accepted and ignored. Without `--deny-warnings` the run reports warnings but still exits 0, so CI was equally non-blocking. Both now call `pnpm oxlint`, keeping the flags in one place. Introduced 2026-03-29 in b6ee4c8, which claimed warnings would fail the build. 9b0cb38 diagnosed the invalid flag but fixed only the npm script, leaving both actual gates broken. Co-Authored-By: Claude Opus 5 (1M context) --- lefthook.yml | 2 +- package.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lefthook.yml b/lefthook.yml index c0d66ce..8a344c4 100644 --- a/lefthook.yml +++ b/lefthook.yml @@ -24,6 +24,6 @@ pre-commit: - name: typecheck run: pnpm exec tsc --build - name: oxlint - run: pnpm oxlint -- --deny warnings + run: pnpm oxlint - name: test run: pnpm vitest run --reporter=dot --coverage.reporter=text-summary diff --git a/package.json b/package.json index 2e6d77c..6cddaf8 100644 --- a/package.json +++ b/package.json @@ -29,6 +29,6 @@ "check:ignores": "node scripts/check-lint-ignores.mjs", "check:classnames": "node scripts/check-cn-classnames.mjs", "check:props": "node scripts/check-component-props.mjs", - "check": "pnpm audit --audit-level=high && knip && biome check . && node scripts/check-lint-ignores.mjs && node scripts/check-cn-classnames.mjs && node scripts/check-component-props.mjs && jscpd && pnpm jsinspect && tsc --build && oxlint --tsconfig tsconfig.json --type-aware --deny warnings && vitest run" + "check": "pnpm audit --audit-level=high && knip && biome check . && node scripts/check-lint-ignores.mjs && node scripts/check-cn-classnames.mjs && node scripts/check-component-props.mjs && jscpd && pnpm jsinspect && tsc --build && pnpm oxlint && vitest run" } }