Skip to content

Commit

Permalink
Installation and configuration of husky
Browse files Browse the repository at this point in the history
  • Loading branch information
onesine committed Jul 30, 2023
1 parent 22e700b commit fb45409
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 2 deletions.
4 changes: 4 additions & 0 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/usr/bin/env sh
. "$(dirname -- "$0")/_/husky.sh"

npx 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 @@
#!/usr/bin/env sh
. "$(dirname -- "$0")/_/husky.sh"

#npm run test
1 change: 1 addition & 0 deletions .npmignore
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ pages
styles
.next
.rollup.cache
.husky
## Files
babel.config.json
tsconfig.json
Expand Down
10 changes: 8 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,8 @@
"code-style:fix": "npm run pret:fix && npm run pret:fix",
"build": "npm run code-style && npm run clean && rollup -c",
"pub": "npm run build && npm publish",
"dev": "next dev -p 8888"
"dev": "next dev -p 8888",
"prepare": "husky install"
},
"repository": {
"type": "git",
Expand Down Expand Up @@ -58,7 +59,8 @@
"eslint-plugin-prettier": "^4.2.1",
"eslint-plugin-react": "^7.31.11",
"eslint-plugin-react-hooks": "^4.6.0",
"husky": "^8.0.3",
"husky": "^8.0.0",
"lint-staged": "^13.2.3",
"next": "^13.1.1",
"postcss": "^8.4.19",
"prettier": "^2.8.0",
Expand All @@ -68,5 +70,9 @@
"tailwindcss": "^3.2.4",
"tslib": "^2.4.0",
"typescript": "^4.8.4"
},
"lint-staged": {
"*.{ts,tsx}": ["npm run lint"],
"*.{ts,tsx,css,scss,md}": ["npm run pret:fix"]
}
}

0 comments on commit fb45409

Please sign in to comment.