Skip to content

Commit 7269cfc

Browse files
authored
Merge pull request #171 from setaman/v2-dev-add-commitlint-and-husky
V2 dev add commitlint and husky
2 parents f7df71f + ebd5e4d commit 7269cfc

File tree

7 files changed

+53
-18
lines changed

7 files changed

+53
-18
lines changed

.eslintignore

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
App.vue
2+
tests

.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 -- 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+
npm run lint

commitlint.config.js

+1-5
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,4 @@
11
module.exports = {
22
extends: ["@commitlint/config-conventional"],
3-
"type-enum": [
4-
2,
5-
"always",
6-
["build", "ci", "docs", "feat", "fix", "perf", "refactor", "revert", "style", "test", "release"],
7-
],
3+
"type-enum": [2, "always", ["build", "ci", "docs", "feat", "fix", "refactor", "revert", "test", "release"]],
84
};

package-lock.json

+35-9
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

+6-3
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,12 @@
77
"scripts": {
88
"serve": "vue-cli-service serve",
99
"build": "vue-cli-service build --target lib --formats umd-min --name veprogress ./src/plugin.js",
10-
"lint": "vue-cli-service lint --fix",
10+
"lint:fix": "vue-cli-service lint --fix --ignore-path App.vue",
11+
"lint": "vue-cli-service lint",
1112
"test": "vue-cli-service test:unit --colors",
1213
"publish-beta": "npm run lint && npm run test && npm run build && npm publish --tag beta",
13-
"changelog": "auto-changelog --template changelog-template.hbs"
14+
"changelog": "auto-changelog --template changelog-template.hbs",
15+
"prepare": "husky install"
1416
},
1517
"author": {
1618
"name": "Sergej Atamantschuk",
@@ -55,7 +57,8 @@
5557
"node-sass": "^5.0.0",
5658
"prettier": "^2.3.0",
5759
"sass-loader": "^10.1.1",
58-
"vue": "^3.0.6"
60+
"vue": "^3.0.6",
61+
"husky": "^7.0.0"
5962
},
6063
"files": [
6164
"dist"

tests/unit/container.spec.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import CircleContainer from "@/components/Circle/CircleContainer.vue";
55
import Counter from "@/components/Counter.vue";
66
import { animationParser, dotParser, dashParser, lineModeParser, linePositionParser } from "@/components/optionsParser";
77
import props from "@/components/interface";
8-
import { defaultCounterTick, wait } from "@/../tests/helper";
8+
import { defaultCounterTick } from "@/../tests/helper";
99
import { nextTick } from "vue";
1010

1111
const factory = (propsData, slots = {}) => {

0 commit comments

Comments
 (0)