From ebd384b863c2abbffb4ff65621e124c9386640da Mon Sep 17 00:00:00 2001 From: Anton Reshetov Date: Mon, 15 Apr 2019 09:41:17 +0300 Subject: [PATCH] fix: add lint stage & test --- build/bin/release.sh | 2 +- package.json | 15 ++++++++++++++- 2 files changed, 15 insertions(+), 2 deletions(-) diff --git a/build/bin/release.sh b/build/bin/release.sh index 51f1011..7235a74 100755 --- a/build/bin/release.sh +++ b/build/bin/release.sh @@ -7,7 +7,7 @@ read -p "Releasing $VERSION - are you sure? (y/n)" -n 1 -r echo if [[ $REPLY =~ ^[Yy]$ ]] then - npm run lint && npm run build + npm run test:unit && npm run lint && npm run build git add -A git commit -m "release $VERSION" npm version $VERSION -m "release $VERSION" diff --git a/package.json b/package.json index 048b7e9..35a5823 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "vfc", "description": "Vue form components with validation", - "version": "2.0.0", + "version": "1.1.2", "private": false, "repository": { "type": "git", @@ -58,5 +58,18 @@ "sass-loader": "^7.1.0", "vue-svg-loader": "^0.10.0", "vue-template-compiler": "^2.5.17" + }, + "gitHooks": { + "pre-commit": "lint-staged" + }, + "lint-staged": { + "*.js": [ + "vue-cli-service lint", + "git add" + ], + "*.vue": [ + "vue-cli-service lint", + "git add" + ] } }