Skip to content

Commit

Permalink
Merge pull request #747 from GoogleChromeLabs/feature/add-husky
Browse files Browse the repository at this point in the history
Add husky
  • Loading branch information
westonruter authored Mar 31, 2022
2 parents 2809ee6 + c0f90bb commit d2130d3
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 1 deletion.
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"

npm run lint:staged
6 changes: 6 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 @@ -33,6 +33,7 @@
"grunt-contrib-copy": "1.0.0",
"grunt-shell": "4.0.0",
"grunt-wp-deploy": "2.1.2",
"husky": "^7.0.4",
"lint-staged": "12.3.7",
"npm-run-all": "4.1.5",
"prettier": "2.6.1",
Expand All @@ -52,7 +53,8 @@
"lint:pkg-json": "wp-scripts lint-pkg-json --ignorePath .gitignore",
"lint:staged": "lint-staged",
"test": "npm-run-all --parallel test:*",
"test:php": "vendor/bin/phpunit"
"test:php": "vendor/bin/phpunit",
"prepare": "husky install"
},
"lint-staged": {
"package.json": [
Expand Down

0 comments on commit d2130d3

Please # to comment.