@@ -0,0 +1,9 @@
+#!/usr/bin/env bash
+
+# get files to be linted
+FILES=$(git diff --cached --name-only | grep -E '^src|^test/unit/specs|^test/e2e')
+# lint them if any
+if [[ $FILES ]]; then
+ ./node_modules/.bin/eslint $FILES
+fi
@@ -18,6 +18,7 @@
"homepage": "http://vuejs.org",
"scripts": {
"test": "grunt ci",
+ "install-hook": "ln -s ../../build/git-hooks/pre-commit .git/hooks/pre-commit",
"dev": "webpack --watch --config build/webpack.dev.config.js & webpack --watch --config build/webpack.test.config.js"
},
"dependencies": {