From 3e11cb608b3b69d4c3ffebe2cb5d29f2cf949ecf Mon Sep 17 00:00:00 2001 From: Gcaufy Date: Mon, 21 Oct 2019 09:28:20 +0800 Subject: [PATCH] chore: added lint and test in pre-commit hook --- package.json | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/package.json b/package.json index 6844c757f..63b6294fa 100644 --- a/package.json +++ b/package.json @@ -14,7 +14,7 @@ "build": "node ./node_modules/gulp/bin/gulp build", "watch-compile": "npm run build -- --watch", "watch": "node ./node_modules/gulp/bin/gulp watch", - "test": "./scripts/test.sh", + "test": "npm run lint && ./scripts/test.sh", "clean": "./scripts/clean.sh", "publish": "./scripts/npm_publish/index.js publish", "pub": "./node_modules/.bin/verpub publish", @@ -101,6 +101,7 @@ "dependencies": {}, "husky": { "hooks": { + "pre-commit": "npm run test", "commit-msg": "npx validate-commit-msg" } },