Skip to content

Commit

Permalink
update husky configuration
Browse files Browse the repository at this point in the history
  • Loading branch information
enochndika committed Apr 7, 2021
1 parent 8771c11 commit 5f9209e
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 10 deletions.
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
12 changes: 2 additions & 10 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,20 +7,12 @@
"build": "next build",
"start": "next start",
"postbuild": "next-sitemap",
"lint": "eslint '*/**/*.{js,ts,tsx}' --quiet --fix",
"format": "prettier '*/**/*.{js,ts,tsx}' --write",
"prepare": "husky install"
},
"husky": {
"hooks": {
"pre-commit": "lint-staged"
}
},
"lint-staged": {
"*/**/*.{js,ts,tsx": [
"eslint --fix",
"prettier --write",
"git add"
"yarn eslint",
"yarn prettier --write"
]
},
"repository": {
Expand Down

1 comment on commit 5f9209e

@vercel
Copy link

@vercel vercel bot commented on 5f9209e Apr 7, 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.