Skip to content

Commit 0dd3ba6

Browse files
committed
➕ add pre-commit husky hook
1 parent 761cc82 commit 0dd3ba6

File tree

4 files changed

+557
-1
lines changed

4 files changed

+557
-1
lines changed

.husky/pre-commit

Lines changed: 14 additions & 0 deletions
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!';

.lintstagedrc.js

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

0 commit comments

Comments
 (0)