chore(ci): Fail the commit if a module imports or uses debug helpers
parent
ad85c958d0
commit
3609fc9c92
|
@ -1,5 +1,4 @@
|
||||||
import $ from 'jquery';
|
import $ from 'jquery';
|
||||||
import { debugBreak } from './utils/debug-helpers.js';
|
|
||||||
|
|
||||||
function initialize() {
|
function initialize() {
|
||||||
var codeBlockSelector = '.article--content pre';
|
var codeBlockSelector = '.article--content pre';
|
||||||
|
|
|
@ -5,6 +5,10 @@
|
||||||
pre-commit:
|
pre-commit:
|
||||||
parallel: true
|
parallel: true
|
||||||
commands:
|
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:
|
build-copilot-instructions:
|
||||||
glob: "CONTRIBUTING.md"
|
glob: "CONTRIBUTING.md"
|
||||||
run: yarn build:copilot-instructions
|
run: yarn build:copilot-instructions
|
||||||
|
@ -58,6 +62,10 @@ pre-commit:
|
||||||
{ echo "⚠️ Prettier found formatting issues. Automatic formatting applied."
|
{ echo "⚠️ Prettier found formatting issues. Automatic formatting applied."
|
||||||
git add {staged_files}
|
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:
|
pre-push:
|
||||||
commands:
|
commands:
|
||||||
packages-audit:
|
packages-audit:
|
||||||
|
|
Loading…
Reference in New Issue