Skip to content

Commit ebd384b

Browse files
committed
fix: add lint stage & test
1 parent 656b927 commit ebd384b

File tree

2 files changed

+15
-2
lines changed

2 files changed

+15
-2
lines changed

build/bin/release.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ read -p "Releasing $VERSION - are you sure? (y/n)" -n 1 -r
77
echo
88
if [[ $REPLY =~ ^[Yy]$ ]]
99
then
10-
npm run lint && npm run build
10+
npm run test:unit && npm run lint && npm run build
1111
git add -A
1212
git commit -m "release $VERSION"
1313
npm version $VERSION -m "release $VERSION"

package.json

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "vfc",
33
"description": "Vue form components with validation",
4-
"version": "2.0.0",
4+
"version": "1.1.2",
55
"private": false,
66
"repository": {
77
"type": "git",
@@ -58,5 +58,18 @@
5858
"sass-loader": "^7.1.0",
5959
"vue-svg-loader": "^0.10.0",
6060
"vue-template-compiler": "^2.5.17"
61+
},
62+
"gitHooks": {
63+
"pre-commit": "lint-staged"
64+
},
65+
"lint-staged": {
66+
"*.js": [
67+
"vue-cli-service lint",
68+
"git add"
69+
],
70+
"*.vue": [
71+
"vue-cli-service lint",
72+
"git add"
73+
]
6174
}
6275
}

0 commit comments

Comments
 (0)