Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Add husky #747

Merged
merged 3 commits into from
Mar 31, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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