We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 78d6abe commit d106484Copy full SHA for d106484
build/git-hooks/pre-commit
@@ -0,0 +1,9 @@
1
+#!/usr/bin/env bash
2
+
3
+# get files to be linted
4
+FILES=$(git diff --cached --name-only | grep -E '^src|^test/unit/specs|^test/e2e')
5
6
+# lint them if any
7
+if [[ $FILES ]]; then
8
+ ./node_modules/.bin/eslint $FILES
9
+fi
package.json
@@ -18,6 +18,7 @@
18
"homepage": "http://vuejs.org",
19
"scripts": {
20
"test": "grunt ci",
21
+ "install-hook": "ln -s ../../build/git-hooks/pre-commit .git/hooks/pre-commit",
22
"dev": "webpack --watch --config build/webpack.dev.config.js & webpack --watch --config build/webpack.test.config.js"
23
},
24
"dependencies": {
0 commit comments