File tree Expand file tree Collapse file tree 5 files changed +39
-6
lines changed
Expand file tree Collapse file tree 5 files changed +39
-6
lines changed Original file line number Diff line number Diff line change @@ -4,3 +4,4 @@ node_modules/
44.DS_Store
55yarn.lock
66* .tar.gz
7+ ! .husky /_ /husky.sh
Original file line number Diff line number Diff line change 1+ #! /bin/sh
2+ if [ -z " $husky_skip_init " ]; then
3+ debug () {
4+ if [ " $HUSKY_DEBUG " = " 1" ]; then
5+ echo " husky (debug) - $1 "
6+ fi
7+ }
8+
9+ readonly hook_name=" $( basename " $0 " ) "
10+ debug " starting $hook_name ..."
11+
12+ if [ " $HUSKY " = " 0" ]; then
13+ debug " HUSKY env variable is set to 0, skipping hook"
14+ exit 0
15+ fi
16+
17+ if [ -f ~ /.huskyrc ]; then
18+ debug " sourcing ~/.huskyrc"
19+ . ~ /.huskyrc
20+ fi
21+
22+ export readonly husky_skip_init=1
23+ sh -e " $0 " " $@ "
24+ exitCode=" $? "
25+
26+ if [ $exitCode != 0 ]; then
27+ echo " husky - $hook_name hook exited with code $exitCode (error)"
28+ fi
29+
30+ exit $exitCode
31+ fi
Original file line number Diff line number Diff line change 1+ #! /bin/sh
2+ . " $( dirname " $0 " ) /_/husky.sh"
3+ git update-index --again
Original file line number Diff line number Diff line change 1+ #! /bin/sh
2+ . " $( dirname " $0 " ) /_/husky.sh"
3+ yarn lint-staged
Original file line number Diff line number Diff line change 3131 "devDependencies" : {
3232 "@shelf/eslint-config" : " 0.19.0" ,
3333 "eslint" : " 7.6.0" ,
34- "husky" : " 4.2.5 " ,
34+ "husky" : " 7.0.4 " ,
3535 "jest" : " 26.2.2" ,
3636 "lint-staged" : " 10.2.11" ,
3737 "prettier" : " 2.0.5"
3838 },
39- "husky" : {
40- "hooks" : {
41- "pre-commit" : " lint-staged"
42- }
43- },
4439 "lint-staged" : {
4540 "*.js" : [
4641 " eslint --fix" ,
You can’t perform that action at this time.
0 commit comments