Skip to content

Commit db33576

Browse files
🤖 config(husky): Configure pre-commit hook.
These changes were automatically generated by a transform whose code can be found at: - https://github.com/make-github-pseudonymous-again/rejuvenate/blob/7a92df9c28303ed9cd6ee1a5e4999acfc8c52497/src/transforms/husky:hook-configure-pre-commit.js Please contact the author of the transform if you believe there was an error.
1 parent 6a0a461 commit db33576

File tree

3 files changed

+194
-6
lines changed

3 files changed

+194
-6
lines changed

.husky/pre-commit

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
#!/bin/sh
2+
. "$(dirname "$0")/_/husky.sh"
3+
4+
npm run precommit

package.json

+10
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,7 @@
5656
"lint-config-and-fix": "fixpack || fixpack",
5757
"postinstall": "npm run install-hooks",
5858
"postpublish": "pinst --enable",
59+
"precommit": "lint-staged",
5960
"prepare": "npm run build",
6061
"prepublishOnly": "pinst --disable",
6162
"release": "np --message ':hatching_chick: release: Bumping to v%s.'",
@@ -88,6 +89,7 @@
8889
"esdoc-standard-plugin": "1.0.0",
8990
"fixpack": "4.0.0",
9091
"husky": "8.0.1",
92+
"lint-staged": "13.0.3",
9193
"microbundle": "0.15.1",
9294
"np": "7.4.0",
9395
"pinst": "3.0.0",
@@ -187,6 +189,14 @@
187189
}
188190
}
189191
},
192+
"lint-staged": {
193+
"*.js": [
194+
"npm run lint-and-fix"
195+
],
196+
"package.json": [
197+
"npm run lint-config-and-fix"
198+
]
199+
},
190200
"prettier": {
191201
"trailingComma": "all"
192202
},

0 commit comments

Comments
 (0)