chore(ci): Fail the commit if a module imports or uses debug helpers

chore-js-refactor-footer-scripts-modules
Jason Stirnaman 2025-06-09 17:07:09 -05:00
parent ad85c958d0
commit 3609fc9c92
2 changed files with 8 additions and 1 deletions

View File

@ -1,5 +1,4 @@
import $ from 'jquery';
import { debugBreak } from './utils/debug-helpers.js';
function initialize() {
var codeBlockSelector = '.article--content pre';

View File

@ -5,6 +5,10 @@
pre-commit:
parallel: true
commands:
eslint-debug-check:
glob: "assets/js/*.js"
run: yarn eslint {staged_files}
fail_text: "Debug helpers found! Remove debug imports and calls before committing."
build-copilot-instructions:
glob: "CONTRIBUTING.md"
run: yarn build:copilot-instructions
@ -58,6 +62,10 @@ pre-commit:
{ echo "⚠️ Prettier found formatting issues. Automatic formatting applied."
git add {staged_files}
}
lint-js:
glob: "assets/js/*.{js,ts}"
run: yarn eslint {staged_files}
fail_text: "JavaScript linting failed. Fix errors before committing."
pre-push:
commands:
packages-audit: