Skip to content

Commit

Permalink
add husky (#122)
Browse files Browse the repository at this point in the history
  • Loading branch information
jd2rogers2 authored Jan 17, 2022
1 parent 795f592 commit 18a1969
Show file tree
Hide file tree
Showing 12 changed files with 658 additions and 21,138 deletions.
10 changes: 0 additions & 10 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,16 +30,6 @@ You should include screenshots to help the reviewer understand what to look for
changes are includes. GIFs help immensely when explaining interactions and animations.
-->

preReqs (to be checked by reviewer):

- [ ] following command succeeds:
`cd client && npm run checks && cd ../server && npm run checks && cd ..`
expect tests to pass
- [ ] ensure all files have been formatted:
`cd client && npm run format && cd ../server && npm run format && cd ..`
expect `git status` to show 0 files changed


repro steps:

1. localhost:3000 <!-- or the initial page your test starts on -->
Expand Down
1 change: 1 addition & 0 deletions .husky/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
_
8 changes: 8 additions & 0 deletions .husky/post-checkout
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
#!/bin/sh
FILE="$(dirname "$0")/_/husky.sh"
if [ ! -f "$FILE" ]; then
cd server && npm install && npm run prepare && cd ../client && npm install && npm run prepare && cd ..
fi

. "$FILE"
cd server && npm install && cd ../client && npm install && cd ..
8 changes: 8 additions & 0 deletions .husky/post-merge
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
#!/bin/sh
FILE="$(dirname "$0")/_/husky.sh"
if [ ! -f "$FILE" ]; then
cd server && npm install && npm run prepare && cd ../client && npm install && npm run prepare && cd ..
fi

. "$FILE"
cd server && npm install && cd ../client && npm install && cd ..
4 changes: 4 additions & 0 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"

cd server && npx lint-staged && cd ../client && npx lint-staged && cd ..
4 changes: 4 additions & 0 deletions .husky/pre-push
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"

cd server && npm run checks && cd ../client && npm run checks && cd ..
Loading

0 comments on commit 18a1969

Please sign in to comment.