Skip to content

Commit f8d44f1

Browse files
Merge pull request #232 from remarkablemark/chore/husky
chore(husky): migrate husky 4 to 5
2 parents 69177fc + 8d84756 commit f8d44f1

File tree

5 files changed

+14
-8
lines changed

5 files changed

+14
-8
lines changed

.husky/.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
_

.husky/commit-msg

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+
npx commitlint --edit $1

.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:dts && npm run test:ci && npx lint-staged

.huskyrc.json

Lines changed: 0 additions & 6 deletions
This file was deleted.

package.json

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,9 @@
1212
"lint": "eslint --ignore-path .gitignore --ignore-pattern /examples/ .",
1313
"lint:dts": "dtslint .",
1414
"lint:fix": "npm run lint -- --fix",
15-
"prepublishOnly": "npm run lint && npm run lint:dts && npm run test:ci && npm run clean && npm run build",
15+
"postinstall": "husky install",
16+
"postpublish": "pinst --enable",
17+
"prepublishOnly": "pinst --disable && npm run lint && npm run lint:dts && npm run test:ci && npm run clean && npm run build",
1618
"release": "standard-version --no-verify",
1719
"test": "jest --coverage --testPathIgnorePatterns test/integration/",
1820
"test:ci": "npm test -- --ci",
@@ -51,9 +53,10 @@
5153
"dtslint": "^4.0.6",
5254
"eslint": "^7.15.0",
5355
"eslint-plugin-prettier": "^3.3.0",
54-
"husky": "^4.3.6",
56+
"husky": "^5.1.1",
5557
"jest": "^26.6.3",
5658
"lint-staged": "^10.5.3",
59+
"pinst": "^2.1.6",
5760
"preact": "^10.5.7",
5861
"prettier": "^2.2.1",
5962
"react": "^17",

0 commit comments

Comments
 (0)