diff --git a/package.json b/package.json index dc464851d4..c1ae6a641a 100644 --- a/package.json +++ b/package.json @@ -38,17 +38,18 @@ "extract-text-webpack-plugin": "^3.0.0", "html-loader": "^0.5.1", "html-webpack-plugin": "^2.30.1", + "husky": "^0.14.3", "isomorphic-fetch": "^2.2.1", "istanbul": "^0.4.5", "jsdom": "^9.12.0", "less": "^2.7.2", "less-loader": "^4.0.5", "less-plugin-clean-css": "^1.5.1", + "lint-staged": "^4.3.0", "mocha": "^3.0.2", "nps": "^5.7.1", "nps-utils": "^1.3.0", "nyc": "^11.1.0", - "pre-push": "^0.1.1", "react": "^15.5.0", "react-addons-shallow-compare": "^15.5.0", "react-dom": "^15.5.0", @@ -83,7 +84,8 @@ "lint": "eslint .", "publish:examples": "NODE_ENV=production nps publish", "start": "webpack-dev-server --progress", - "test": "NODE_ENV=test mocha --compilers js:babel-core/register" + "test": "NODE_ENV=test mocha --compilers js:babel-core/register", + "precommit": "lint-staged && yarn run test" }, "files": [ "dist", @@ -99,8 +101,7 @@ "select", "ui" ], - "pre-push": [ - "lint", - "test" - ] + "lint-staged": { + "*.js": ["eslint", "git add"] + } }