File tree Expand file tree Collapse file tree 4 files changed +34
-0
lines changed
Expand file tree Collapse file tree 4 files changed +34
-0
lines changed Original file line number Diff line number Diff line change 1+ #! /bin/bash
2+
3+ # Install dependencies
4+ yarn install
Original file line number Diff line number Diff line change 1+ #! /bin/bash
2+ current_branch=$( git symbolic-ref --short HEAD)
3+
4+ # Prevent push to main branch
5+ if [ " $current_branch " = " main" ]; then
6+ echo " Push to main branch is not allowed"
7+ exit 1
8+ fi
9+
10+ # Run lint:fix and test scripts
11+ if ! (echo " Running ESLint..." && yarn run lint:fix) ; then
12+ echo " Linting failed, push not allowed"
13+ exit 1
14+ fi
15+
16+ # if ! yarn test ; then
17+ # echo "Tests failed, push not allowed"
18+ # exit 1
19+ # fi
Original file line number Diff line number Diff line change 120120 "eslint-plugin-react" : " ^7.32.2" ,
121121 "eslint-plugin-react-hooks" : " ^4.6.0" ,
122122 "global-jsdom" : " ^8.5.0" ,
123+ "husky" : " ^8.0.0" ,
123124 "jest" : " ^29.0.1" ,
124125 "jest-environment-jsdom" : " ^29.0.1" ,
125126 "jest-extended" : " ^3.2.4" ,
Original file line number Diff line number Diff line change @@ -2492,6 +2492,7 @@ __metadata:
24922492 eslint-plugin-react: ^7.32.2
24932493 eslint-plugin-react-hooks: ^4.6.0
24942494 global-jsdom: ^8.5.0
2495+ husky: ^8.0.0
24952496 jest: ^29.0.1
24962497 jest-environment-jsdom: ^29.0.1
24972498 jest-extended: ^3.2.4
@@ -10683,6 +10684,15 @@ __metadata:
1068310684 languageName: node
1068410685 linkType: hard
1068510686
10687+ "husky@npm:^8.0.0":
10688+ version: 8.0.3
10689+ resolution: "husky@npm:8.0.3"
10690+ bin:
10691+ husky: lib/bin.js
10692+ checksum: 837bc7e4413e58c1f2946d38fb050f5d7324c6f16b0fd66411ffce5703b294bd21429e8ba58711cd331951ee86ed529c5be4f76805959ff668a337dbfa82a1b0
10693+ languageName: node
10694+ linkType: hard
10695+
1068610696"iconv-lite@npm:0.4.24, iconv-lite@npm:^0.4.24":
1068710697 version: 0.4.24
1068810698 resolution: "iconv-lite@npm:0.4.24"
You can’t perform that action at this time.
0 commit comments