Skip to content

Commit

Permalink
Chore: git commit lint staged
Browse files Browse the repository at this point in the history
  • Loading branch information
xingorg1 committed Nov 27, 2020
1 parent 98ffa23 commit 3e5ac9a
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 deletions.
2 changes: 1 addition & 1 deletion build/git-release.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/usr/bin/env sh
npm run dist # 先看能不能打包成功,没有代码校验等问题再切换分之
npm run lint # 先校验

git checkout dev

Expand Down
12 changes: 11 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
"dev": "npm run serve",
"serve": "vue-cli-service serve",
"build": "vue-cli-service build",
"dist": "vue-cli-service build --target lib --name axe ./packages/index.js && vue-cli-service build --axe --no-clean",
"dist": "npm run lint && vue-cli-service build --target lib --name axe ./packages/index.js && vue-cli-service build --axe --no-clean",
"test:unit": "vue-cli-service test:unit",
"test:ui": "karma start",
"lint": "vue-cli-service lint",
Expand Down Expand Up @@ -81,7 +81,17 @@
"lint-staged": {
"*.{js,jsx,vue}": [
"vue-cli-service lint",
"eslint --fix",
"prettier --write",
"git add"
],
"*.{css,scss}": [
"stylelint --cache --fix",
"prettier --write"
],
"*.scss": [
"stylelint --syntax=scss",
"prettier --write"
]
},
"engines": {
Expand Down

0 comments on commit 3e5ac9a

Please sign in to comment.