Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
echo "πŸ‘‰ Running lint (frontend)..."
cd frontend || exit 1
npm run lint || {
echo "❌ Lint failed, push aborted."
exit 1
}

cd - || exit 1
echo "βœ… All frontend checks passed."
25 changes: 13 additions & 12 deletions .husky/pre-push
Original file line number Diff line number Diff line change
@@ -1,14 +1,15 @@
#!/usr/bin/env node

const { execSync } = require("child_process");
echo "πŸ‘‰ Running lint (frontend)..."
cd frontend || exit 1
npm run lint || {
echo "❌ Lint failed, push aborted."
exit 1
}

try {
console.log("πŸ‘‰ Running lint (frontend)...");
execSync("cd frontend && npm run lint", { stdio: "inherit" });
console.log("πŸ‘‰ Running lhci (frontend)...");
execSync("cd frontend && npm run lhci autorun", { stdio: "inherit" });
console.log("βœ… All frontend checks passed.");
} catch (err) {
console.error("❌ Checks failed, push aborted.");
process.exit(1);
echo "πŸ‘‰ Running lhci (frontend)..."
npm run lhci autorun || {
echo "❌ LHCI checks failed, push aborted."
exit 1
}

cd - || exit 1
echo "βœ… All frontend checks passed."
Loading