Skip to content

Commit

Permalink
Merge pull request #7115 from ampproject/add/husky
Browse files Browse the repository at this point in the history
Add husky
  • Loading branch information
westonruter authored May 20, 2022
2 parents a5c1847 + da9c0df commit e875015
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 0 deletions.
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.

2 changes: 2 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,7 @@
"grunt-contrib-copy": "1.0.0",
"grunt-shell": "4.0.0",
"grunt-wp-deploy": "2.1.2",
"husky": "8.0.1",
"jest-silent-reporter": "0.5.0",
"lint-staged": "12.4.1",
"lodash": "4.17.21",
Expand Down Expand Up @@ -127,6 +128,7 @@
"lint:plugin-bootstrap": "vendor/bin/phpcs --runtime-set testVersion 5.2- amp.php",
"lint:pkg-json": "wp-scripts lint-pkg-json --ignorePath .gitignore",
"lint:staged": "lint-staged",
"prepare": "husky install",
"start": "wp-scripts start",
"test": "npm-run-all --parallel test:*",
"test:e2e": "wp-scripts test-e2e --config=tests/e2e/jest.config.js",
Expand Down

0 comments on commit e875015

Please # to comment.