Skip to content

Commit 8032954

Browse files
committed
fix: skip oxlint invocation in lint:changes when no lintable files changed
Filter the changed-file list to lintable extensions before handing it to oxlint, so it's only invoked when there's actually something to lint.
1 parent 014f662 commit 8032954

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

‎package.json‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
"test:vitest-watch": "playwright install chromium && vitest --project browser --project node",
2525
"test:vitest-browser-ui": "playwright install chromium && vitest --project browser --browser.headless=false --ui",
2626
"lint": "pnpm -r --stream lint",
27-
"lint:changes": "git diff --name-only $(git merge-base HEAD origin/master)..HEAD | xargs -r oxlint --format=unix",
27+
"lint:changes": "git diff --diff-filter=ACMR --name-only $(git merge-base HEAD origin/master)..HEAD | { grep -E '\\.(js|jsx|ts|tsx|mjs|cjs)$' || true; } | xargs -r oxlint --format=unix",
2828
"lint:fix": "pnpm -r --stream lint:fix",
2929
"lint:commits": "commitlint --from=HEAD^1",
3030
"bootstrap": "node scripts/bootstrap.mjs",

0 commit comments

Comments
 (0)