Skip to content

Commit

Permalink
Setup new husky
Browse files Browse the repository at this point in the history
  • Loading branch information
ayebear committed May 10, 2022
1 parent 6bb3167 commit 2043b0f
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 8 deletions.
8 changes: 8 additions & 0 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
#!/usr/bin/env sh
. "$(dirname -- "$0")/_/husky.sh"

# This loads nvm
export NVM_DIR="$HOME/.nvm"
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh"

npx pretty-quick --staged && npm test
12 changes: 4 additions & 8 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@
"test": "jest --coverage",
"testCoveralls": "jest --coverage && coveralls < coverage/lcov.info",
"doc": "node --experimental-vm-modules ./node_modules/.bin/esdoc",
"deploy": "gh-pages -d docs"
"deploy": "gh-pages -d docs",
"prepare": "husky install"
},
"repository": {
"type": "git",
Expand Down Expand Up @@ -48,10 +49,5 @@
"prettier": "^2.6.2",
"pretty-quick": "^3.1.3"
},
"type": "module",
"husky": {
"hooks": {
"pre-commit": "pretty-quick --staged"
}
}
}
"type": "module"
}

0 comments on commit 2043b0f

Please sign in to comment.