diff --git a/package.json b/package.json index 07e288419..97347d30a 100644 --- a/package.json +++ b/package.json @@ -30,7 +30,14 @@ "test:coverage": "open test/coverage/lcov-report/index.html", "test:watch": "karma start test/karma.conf.js", "test:single": "node ./test/selector.js", - "release": "sh build/release.sh" + "release": "sh build/release.sh", + "precommit": "lint-staged" + }, + "lint-staged": { + "./packages/**/*.{js,vue}": [ + "eslint --fix", + "git add" + ] }, "repository": { "type": "git", @@ -71,6 +78,7 @@ "fast-vue-md-loader": "^1.0.3", "gh-pages": "^1.0.0", "html-webpack-plugin": "3.2.0", + "husky": "^0.14.3", "isparta-loader": "^2.0.0", "karma": "^2.0.0", "karma-chrome-launcher": "^2.2.0", @@ -80,6 +88,7 @@ "karma-sinon-chai": "^1.3.2", "karma-spec-reporter": "^0.0.32", "karma-webpack": "2.0.13", + "lint-staged": "^7.0.4", "mocha": "^5.0.5", "postcss": "^6.0.21", "postcss-calc": "^6.0.0",