Skip to content

Commit 5c871a6

Browse files
committed
➕ add husky hooks
1 parent c051468 commit 5c871a6

File tree

5 files changed

+934
-3
lines changed

5 files changed

+934
-3
lines changed

.husky/pre-commit

+14
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
#!/usr/bin/env sh
2+
. "$(dirname -- "$0")/_/husky.sh"
3+
4+
export FORCE_COLOR=1
5+
6+
echo '🎨 Formating and checking staged files before committing!'
7+
8+
npx lint-staged ||
9+
(
10+
echo '❌ Ooops! Formating and checking process has failed!';
11+
false;
12+
)
13+
14+
echo '✅ Formating and checking process has been successfully completed!';

.husky/pre-push

+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
#!/usr/bin/env sh
2+
. "$(dirname -- "$0")/_/husky.sh"
3+
4+
export FORCE_COLOR=1
5+
6+
echo '🧪 Running tests before pushing!'
7+
8+
npm run test || (
9+
echo '❌ Ooops! Tests have failed!';
10+
false;
11+
)
12+
13+
echo '✅ Tests have been successfully completed!';

.lintstagedrc.js

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
module.exports = {
2+
'**/*.{js,jsx}': ['eslint']
3+
}

0 commit comments

Comments
 (0)