Skip to content

Commit 3609fc9

Browse files
committed
chore(ci): Fail the commit if a module imports or uses debug helpers
1 parent ad85c95 commit 3609fc9

File tree

2 files changed

+8
-1
lines changed

2 files changed

+8
-1
lines changed

assets/js/code-controls.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
import $ from 'jquery';
2-
import { debugBreak } from './utils/debug-helpers.js';
32

43
function initialize() {
54
var codeBlockSelector = '.article--content pre';

lefthook.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,10 @@
55
pre-commit:
66
parallel: true
77
commands:
8+
eslint-debug-check:
9+
glob: "assets/js/*.js"
10+
run: yarn eslint {staged_files}
11+
fail_text: "Debug helpers found! Remove debug imports and calls before committing."
812
build-copilot-instructions:
913
glob: "CONTRIBUTING.md"
1014
run: yarn build:copilot-instructions
@@ -58,6 +62,10 @@ pre-commit:
5862
{ echo "⚠️ Prettier found formatting issues. Automatic formatting applied."
5963
git add {staged_files}
6064
}
65+
lint-js:
66+
glob: "assets/js/*.{js,ts}"
67+
run: yarn eslint {staged_files}
68+
fail_text: "JavaScript linting failed. Fix errors before committing."
6169
pre-push:
6270
commands:
6371
packages-audit:

0 commit comments

Comments
 (0)