Skip to content

Commit 5dfb9eb

Browse files
committed
style(husky): check code and git commit with new Husky
1 parent eec974b commit 5dfb9eb

File tree

4 files changed

+11
-19
lines changed

4 files changed

+11
-19
lines changed

.husky/commit-msg

100644100755
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
#!/usr/bin/env sh
22
. "$(dirname -- "$0")/_/husky.sh"
33

4-
node scripts/verifyCommit.js
4+
npx --no-install commitlint --edit "$1"

package-lock.json

Lines changed: 4 additions & 9 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -6,16 +6,15 @@
66
"scripts": {
77
"prepare": "husky install",
88
"build": "rollup --bundleConfigAsCjs --config rollup.config.js",
9-
"build:tenser": "node scripts/build.js",
9+
"build:terser": "node scripts/build.js",
1010
"test:unit": "jest",
1111
"test": "jest --coverage",
1212
"lint": "eslint ./src --ext .vue,.js,jsx,.ts,tsx",
1313
"lint:fix": "eslint --fix ./src --ext .vue,.js,jsx,.ts,tsx",
1414
"prettier": "prettier -c --write \"**/*.{vue,ts,js,jsx,css,less,scss,json}\"",
15-
"release:patch": "standard-version --release-as patch && git push --follow-tags",
16-
"release:minor": "standard-version --release-as minor && git push --follow-tags",
17-
"release:major": "standard-version --release-as major && git push --follow-tags",
18-
"postinstall": "simple-git-hooks"
15+
"release:patch": "standard-version --release-as patch",
16+
"release:minor": "standard-version --release-as minor",
17+
"release:major": "standard-version --release-as major"
1918
},
2019
"author": "chendq <[email protected]>",
2120
"main": "lib/cjs/index.js",
@@ -70,7 +69,7 @@
7069
"eslint-plugin-jest": "^27.4.2",
7170
"eslint-plugin-prettier": "^5.0.1",
7271
"eslint-plugin-standard": "^5.0.0",
73-
"husky": "^8.0.3",
72+
"husky": "^4.3.8",
7473
"jest": "^29.7.0",
7574
"jest-environment-jsdom": "^29.7.0",
7675
"lint-staged": "^13.2.2",
@@ -95,7 +94,7 @@
9594
},
9695
"husky": {
9796
"hooks": {
98-
"commit-msg": "node scripts/verifyCommit.js",
97+
"commit-msg": "commitlint -E $HUSKY_GIT_PARAMS",
9998
"pre-commit": "lint-staged"
10099
}
101100
},

src/index.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,5 +13,3 @@ export * from './url';
1313
export * from './async';
1414
export * from './file';
1515
export * from './watermark';
16-
17-
console.log(223);

0 commit comments

Comments
 (0)