Skip to content

Commit

Permalink
fix: update husky usage
Browse files Browse the repository at this point in the history
  • Loading branch information
mikesurowiec committed May 20, 2021
1 parent c416620 commit e46422d
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 7 deletions.
1 change: 1 addition & 0 deletions .husky/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
_
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"

node script/prevent-translation-commits.js
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"

npm run prevent-pushes-to-main
8 changes: 1 addition & 7 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -209,11 +209,5 @@
"engines": {
"node": ">= 16.0.0"
},
"repository": "https://github.com/github/docs",
"husky": {
"hooks": {
"pre-commit": "node script/prevent-translation-commits.js",
"pre-push": "npm run prevent-pushes-to-main"
}
}
"repository": "https://github.com/github/docs"
}

0 comments on commit e46422d

Please sign in to comment.