Skip to content

Commit

Permalink
add husky
Browse files Browse the repository at this point in the history
  • Loading branch information
rezkiy37 committed Aug 7, 2023
1 parent 40d1f6b commit 509c0c1
Show file tree
Hide file tree
Showing 3 changed files with 31 additions and 1 deletion.
6 changes: 6 additions & 0 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#!/usr/bin/env sh
. "$(dirname -- "$0")/_/husky.sh"

npm run lint
npm run ts
npm run test
22 changes: 22 additions & 0 deletions package-lock.json

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

4 changes: 3 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,14 @@
"src"
],
"scripts": {
"postinstall": "husky install",
"start": "webpack-dev-server --mode=development --open --hot",
"build": "webpack --mode=production",
"lint": "eslint src --fix",
"ts": "npx tsc --noEmit",
"prettier": "prettier --write .",
"prettier-watch": "onchange \"**/*.js\" -- prettier --write --ignore-unknown {{changed}}",
"test": "echo \"Error: no test specified\" && exit 1"
"test": "echo \"Error: no test specified\""
},
"repository": {
"type": "git",
Expand Down Expand Up @@ -54,6 +55,7 @@
"eslint-plugin-react": "^7.33.1",
"eslint-plugin-react-hooks": "^4.6.0",
"html-webpack-plugin": "^5.5.3",
"husky": "^8.0.3",
"onchange": "^7.1.0",
"prettier": "^3.0.0",
"style-loader": "^3.3.3",
Expand Down

0 comments on commit 509c0c1

Please sign in to comment.