Skip to content

Commit

Permalink
chore: set up Husky precommit (#322)
Browse files Browse the repository at this point in the history
  • Loading branch information
HonkingGoose authored Oct 25, 2021
1 parent 9d563ec commit fdd765f
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 12 deletions.
6 changes: 6 additions & 0 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#!/bin/sh
[ -n "$CI" ] && exit 0

. "$(dirname "$0")/_/husky.sh"

npm run prettier-fix
26 changes: 16 additions & 10 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 4 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,8 @@
"lint": "prettier --check .",
"prettier-fix": "prettier --write .",
"smoketest": "npm run lint && npm run build",
"after-upgrade": "docusaurus clear"
"after-upgrade": "docusaurus clear",
"prepare": "husky install"
},
"dependencies": {
"@docusaurus/core": "2.0.0-beta.8",
Expand All @@ -27,7 +28,8 @@
"react-dom": "17.0.2"
},
"devDependencies": {
"prettier": "2.4.1"
"prettier": "2.4.1",
"husky": "7.0.0"
},
"browserslist": {
"production": [
Expand Down

0 comments on commit fdd765f

Please sign in to comment.