Skip to content

Commit da9c0df

Browse files
committed
Add husky
1 parent a5c1847 commit da9c0df

File tree

3 files changed

+12
-0
lines changed

3 files changed

+12
-0
lines changed

.husky/pre-commit

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
#!/bin/sh
2+
. "$(dirname "$0")/_/husky.sh"
3+
4+
npm run lint:staged

package-lock.json

Lines changed: 6 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,7 @@
8181
"grunt-contrib-copy": "1.0.0",
8282
"grunt-shell": "4.0.0",
8383
"grunt-wp-deploy": "2.1.2",
84+
"husky": "8.0.1",
8485
"jest-silent-reporter": "0.5.0",
8586
"lint-staged": "12.4.1",
8687
"lodash": "4.17.21",
@@ -127,6 +128,7 @@
127128
"lint:plugin-bootstrap": "vendor/bin/phpcs --runtime-set testVersion 5.2- amp.php",
128129
"lint:pkg-json": "wp-scripts lint-pkg-json --ignorePath .gitignore",
129130
"lint:staged": "lint-staged",
131+
"prepare": "husky install",
130132
"start": "wp-scripts start",
131133
"test": "npm-run-all --parallel test:*",
132134
"test:e2e": "wp-scripts test-e2e --config=tests/e2e/jest.config.js",

0 commit comments

Comments
 (0)