Set up husky and lint-staged
This commit is contained in:
parent
0b3d2ae09f
commit
ee3eb2db95
|
@ -0,0 +1,4 @@
|
|||
#!/bin/sh
|
||||
. "$(dirname "$0")/_/husky.sh"
|
||||
|
||||
npx lint-staged
|
File diff suppressed because it is too large
Load Diff
17
package.json
17
package.json
|
@ -19,13 +19,16 @@
|
|||
"test:e2e": "wp-scripts test-e2e",
|
||||
"test:unit": "wp-scripts test-unit-js",
|
||||
"zip": "./bin/build-zip.sh",
|
||||
"release": "./bin/release-to-github.sh"
|
||||
"release": "./bin/release-to-github.sh",
|
||||
"prepare": "husky install"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@woocommerce/dependency-extraction-webpack-plugin": "1.4.0",
|
||||
"@woocommerce/eslint-plugin": "1.1.0",
|
||||
"@wordpress/prettier-config": "^1.0.1",
|
||||
"@wordpress/scripts": "^13.0.3",
|
||||
"husky": "^7.0.4",
|
||||
"lint-staged": "^12.3.7",
|
||||
"prettier": "npm:wp-prettier@^2.2.1-beta-1"
|
||||
},
|
||||
"dependencies": {
|
||||
|
@ -37,5 +40,17 @@
|
|||
"@wordpress/data-controls": "^1.20.7",
|
||||
"@wordpress/element": "^2.19.1",
|
||||
"@wordpress/hooks": "^2.11.1"
|
||||
},
|
||||
"lint-staged": {
|
||||
"*.(t|j)s?(x)": [
|
||||
"npm run format:js",
|
||||
"npm run lint:js"
|
||||
],
|
||||
"*.scss": [
|
||||
"npm run lint:css"
|
||||
],
|
||||
"*.md": [
|
||||
"npm run lint:md:docs"
|
||||
]
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue