Skip to content

Commit c43f7c7

Browse files
committed
chore: migrate husky 4 to 5
husky-4-to-5 v1.0.0
1 parent bc6910f commit c43f7c7

File tree

4 files changed

+13
-8
lines changed

4 files changed

+13
-8
lines changed

.husky/.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
_

.husky/commit-msg

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
#!/bin/sh
2+
. "$(dirname "$0")/_/husky.sh"
3+
4+
npx --no-install commitlint --edit $1

.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+
npx --no-install lint-staged

package.json

+4-8
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
"name": "@microlink/root",
33
"description": "Turns links into a beautiful previews",
44
"homepage": "https://microlink.io/sdk",
5+
"version": "",
56
"author": {
67
"email": "[email protected]",
78
"name": "Kiko Beats",
@@ -29,7 +30,7 @@
2930
"@commitlint/config-conventional": "latest",
3031
"finepack": "latest",
3132
"git-authors-cli": "latest",
32-
"husky": "latest",
33+
"husky": "~5.2.0",
3334
"lerna": "latest",
3435
"lint-staged": "latest",
3536
"npm-check-updates": "latest",
@@ -43,8 +44,9 @@
4344
"scripts": {
4445
"build": "lerna run build",
4546
"clean": "lerna clean --yes && rm -rf node_modules",
46-
"lint": "standard-markdown README.md && lerna exec npm run lint",
4747
"install": "lerna bootstrap --force-local --no-ci",
48+
"lint": "standard-markdown README.md && lerna exec npm run lint",
49+
"postinstall": "husky install",
4850
"prepublishOnly": "lerna run build",
4951
"prerelease": "npm run update:check",
5052
"pretest": "npm run lint",
@@ -61,12 +63,6 @@
6163
"@commitlint/config-conventional"
6264
]
6365
},
64-
"husky": {
65-
"hooks": {
66-
"commit-msg": "commitlint -E HUSKY_GIT_PARAMS",
67-
"pre-commit": "lint-staged"
68-
}
69-
},
7066
"lint-staged": {
7167
"package.json": [
7268
"finepack"

0 commit comments

Comments
 (0)