Skip to content

V2 dev add commitlint and husky #171

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Mar 5, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
App.vue
tests
4 changes: 4 additions & 0 deletions .husky/commit-msg
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"

npx --no -- commitlint --edit $1
4 changes: 4 additions & 0 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"

npm run lint
6 changes: 1 addition & 5 deletions commitlint.config.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,4 @@
module.exports = {
extends: ["@commitlint/config-conventional"],
"type-enum": [
2,
"always",
["build", "ci", "docs", "feat", "fix", "perf", "refactor", "revert", "style", "test", "release"],
],
"type-enum": [2, "always", ["build", "ci", "docs", "feat", "fix", "refactor", "revert", "test", "release"]],
};
44 changes: 35 additions & 9 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 6 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,12 @@
"scripts": {
"serve": "vue-cli-service serve",
"build": "vue-cli-service build --target lib --formats umd-min --name veprogress ./src/plugin.js",
"lint": "vue-cli-service lint --fix",
"lint:fix": "vue-cli-service lint --fix --ignore-path App.vue",
"lint": "vue-cli-service lint",
"test": "vue-cli-service test:unit --colors",
"publish-beta": "npm run lint && npm run test && npm run build && npm publish --tag beta",
"changelog": "auto-changelog --template changelog-template.hbs"
"changelog": "auto-changelog --template changelog-template.hbs",
"prepare": "husky install"
},
"author": {
"name": "Sergej Atamantschuk",
Expand Down Expand Up @@ -55,7 +57,8 @@
"node-sass": "^5.0.0",
"prettier": "^2.3.0",
"sass-loader": "^10.1.1",
"vue": "^3.0.6"
"vue": "^3.0.6",
"husky": "^7.0.0"
},
"files": [
"dist"
Expand Down
2 changes: 1 addition & 1 deletion tests/unit/container.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import CircleContainer from "@/components/Circle/CircleContainer.vue";
import Counter from "@/components/Counter.vue";
import { animationParser, dotParser, dashParser, lineModeParser, linePositionParser } from "@/components/optionsParser";
import props from "@/components/interface";
import { defaultCounterTick, wait } from "@/../tests/helper";
import { defaultCounterTick } from "@/../tests/helper";
import { nextTick } from "vue";

const factory = (propsData, slots = {}) => {
Expand Down