Skip to content

Commit

Permalink
chore: set up husky
Browse files Browse the repository at this point in the history
  • Loading branch information
ZachHaber committed Jun 23, 2022
1 parent a82260f commit e5e5729
Show file tree
Hide file tree
Showing 5 changed files with 45 additions and 6 deletions.
1 change: 1 addition & 0 deletions .gitattributes
Expand Up @@ -22,6 +22,7 @@
*.txt text eol=lf
*.xml text eol=lf
*.yml text eol=lf
.husky/* text eol=lf

# Exclude the `.htaccess` file from GitHub's language statistics
# https://github.com/github/linguist#using-gitattributes
Expand Down
4 changes: 4 additions & 0 deletions .husky/commit_msg
@@ -0,0 +1,4 @@
#!/usr/bin/env sh
. "$(dirname -- "$0")/_/husky.sh"

npx --no -- commitlint --edit $1
4 changes: 4 additions & 0 deletions .husky/pre-push
@@ -0,0 +1,4 @@
#!/usr/bin/env sh
. "$(dirname -- "$0")/_/husky.sh"

npm test && npm run typings
34 changes: 34 additions & 0 deletions package-lock.json

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

8 changes: 2 additions & 6 deletions package.json
Expand Up @@ -33,6 +33,7 @@
"node": ">=8.0"
},
"scripts": {
"prepare": "is-ci || husky install",
"pretest": "prettier --check . && eslint \"lib/**/*.js\" \"test/**/*.js\"",
"prettier:fix": "prettier --write .",
"test": "tap \"test/tap/**/*.js\" --cov --timeout=45",
Expand Down Expand Up @@ -63,6 +64,7 @@
"eslint-plugin-prettier": "^4.0.0",
"fs-extra": "^10.1.0",
"husky": "^8.0.1",
"is-ci": "^3.0.1",
"nyc": "^15.1.0",
"prettier": "^2.6.0",
"proxyquire": "^2.1.3",
Expand All @@ -83,11 +85,5 @@
"require": [
"./test/sandbox-coverage"
]
},
"husky": {
"hooks": {
"commit-msg": "validate-commit-msg",
"pre-push": "npm test && npm run typings"
}
}
}

0 comments on commit e5e5729

Please sign in to comment.