Skip to content

Commit

Permalink
chore: migrate to native git hooks
Browse files Browse the repository at this point in the history
  • Loading branch information
Sukaato committed Aug 15, 2024
1 parent 1c4bad4 commit bbb0283
Show file tree
Hide file tree
Showing 7 changed files with 252 additions and 1,389 deletions.
10 changes: 10 additions & 0 deletions .githooks/commit-msg
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
#!/bin/sh

if [ -z "$(git log -1 --pretty=%B)" ]; then
echo "Erreur : Le message de commit ne peut pas être vide."
exit 1
fi

echo Validate commit message using "$(npx commitlint --version)"

npx commitlint --edit --verbose
11 changes: 11 additions & 0 deletions .githooks/h
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
#!/usr/bin/env sh
n=$(basename "$0")
s=$(dirname "$(dirname "$0")")/$n

[ ! -f "$s" ] && exit 0

export PATH="node_modules/.bin:$PATH"
sh -e "$s" "$@"
c=$?

exit $c
9 changes: 9 additions & 0 deletions .githooks/pre-commit
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# Core
cd packages/core
npm run format
npm run lint

# Vue
cd ../vue
npm run format
npm run lint
1 change: 0 additions & 1 deletion .husky/commit-msg

This file was deleted.

2 changes: 0 additions & 2 deletions .husky/pre-commit

This file was deleted.

Loading

0 comments on commit bbb0283

Please sign in to comment.