Skip to content

Commit

Permalink
🔧 Migrate to Husky v5 (#719)
Browse files Browse the repository at this point in the history
  • Loading branch information
carloscuesta committed Mar 6, 2021
1 parent 712b46b commit 220b9c3
Show file tree
Hide file tree
Showing 4 changed files with 11 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"

yarn lint-staged
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"

yarn run flow && yarn run test
9 changes: 2 additions & 7 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,8 @@
"start": "next start",
"test": "jest --coverage",
"validate:gitmojis": "jsonlint ./src/data/gitmojis.json -V ./src/data/schema.json",
"prepublishOnly": "git checkout master && git pull && npm run validate:gitmojis"
"prepublishOnly": "git checkout master && git pull && npm run validate:gitmojis",
"prepare": "husky install"
},
"devDependencies": {
"@babel/preset-flow": "^7.0.0",
Expand Down Expand Up @@ -65,12 +66,6 @@
"git add"
]
},
"husky": {
"hooks": {
"pre-commit": "lint-staged",
"pre-push": "npm run flow && npm run test"
}
},
"babel": {
"presets": [
"next/babel",
Expand Down

1 comment on commit 220b9c3

@vercel
Copy link

@vercel vercel bot commented on 220b9c3 Mar 6, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.