Git pre-push checks for UI (#3072)

* Added eslint cached option (#2291)

* Added pre-push script running linting (#2291)

* Modifies pre-push hook to run if eslint installed // auto install hook

* Update pre-push script comment

* Added husky for git hooks (#3072)
This commit is contained in:
Nicolas Gotchac 2016-11-10 11:42:00 +01:00 committed by Jaco Greeff
parent 6ffaab15a3
commit 1deeb0d901
2 changed files with 5 additions and 1 deletions

1
js/.gitignore vendored
View File

@ -6,3 +6,4 @@ build
.dist
.happypack
.npmjs
.eslintcache

View File

@ -39,9 +39,11 @@
"clean": "rm -rf ./build ./coverage",
"coveralls": "npm run testCoverage && coveralls < coverage/lcov.info",
"lint": "eslint --ignore-path .gitignore ./src/",
"lint:cached": "eslint --cache --ignore-path .gitignore ./src/",
"test": "mocha 'src/**/*.spec.js'",
"test:coverage": "istanbul cover _mocha -- 'src/**/*.spec.js'",
"test:e2e": "mocha 'src/**/*.e2e.js'"
"test:e2e": "mocha 'src/**/*.e2e.js'",
"prepush": "npm run lint:cached"
},
"devDependencies": {
"babel-cli": "^6.10.1",
@ -84,6 +86,7 @@
"happypack": "^2.2.1",
"history": "^2.0.0",
"html-loader": "^0.4.4",
"husky": "^0.11.9",
"ignore-styles": "2.0.0",
"image-webpack-loader": "^1.8.0",
"istanbul": "^1.0.0-alpha.2",