Included husky and lint-staged for pre-commit hook

This commit is contained in:
Claudio Sanches 2018-11-19 19:07:37 -02:00
parent 4520e88328
commit 6a760c1c50
2 changed files with 1359 additions and 68 deletions

1399
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@ -49,10 +49,13 @@
"grunt-shell": "~2.1.0",
"grunt-stylelint": "~0.10.0",
"grunt-wp-i18n": "~1.0.1",
"husky": "^1.1.4",
"istanbul": "^1.0.0-alpha",
"lint-staged": "^8.0.5",
"mocha": "^5.2.0",
"prettier": "github:automattic/calypso-prettier#c56b4251",
"stylelint": "~9.2.1",
"stylelint-config-wordpress": "^13.1.0",
"wc-e2e-page-objects": "0.10.0"
},
"engines": {
@ -61,5 +64,30 @@
},
"dependencies": {
"github-contributors-list": "https://github.com/woocommerce/github-contributors-list/tarball/master"
},
"husky": {
"hooks": {
"pre-commit": "lint-staged"
}
},
"lint-staged": {
"linters": {
"*.php": [
"php -d display_errors=1 -l",
"composer run-script phpcs"
],
"*.scss": [
"stylelint --syntax=scss --fix",
"git add"
],
"*.js": [
"eslint --fix",
"git add"
]
},
"ignore": [
"*.min.js",
"*.css"
]
}
}