Skip to content

Commit 0deac1f

Browse files
chore: migrate husky 4 to 5
husky-4-to-5 v1.0.0-alpha
1 parent 69177fc commit 0deac1f

File tree

5 files changed

+15
-9
lines changed

5 files changed

+15
-9
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+
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 && lint-staged

.huskyrc.json

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

package.json

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,13 +12,15 @@
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+
"prepublishOnly": "pinst --disable && npm run lint && npm run lint:dts && npm run test:ci && npm run clean && npm run build",
1616
"release": "standard-version --no-verify",
1717
"test": "jest --coverage --testPathIgnorePatterns test/integration/",
1818
"test:ci": "npm test -- --ci",
1919
"test:module": "node --experimental-modules test/module/index.mjs",
2020
"test:integration": "npm run build && jest test/integration/",
21-
"test:watch": "npm test -- --watch"
21+
"test:watch": "npm test -- --watch",
22+
"postinstall": "husky install",
23+
"postpublish": "pinst --enable"
2224
},
2325
"repository": {
2426
"type": "git",
@@ -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)