From 66ce4c664f429a672ac14821f4a9fe6d3f00a580 Mon Sep 17 00:00:00 2001 From: Steven Atkinson Date: Thu, 10 Oct 2019 23:30:39 +0100 Subject: Added husky and lint-staged with hooks. --- package.json | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/package.json b/package.json index ef564ce0..155144a6 100644 --- a/package.json +++ b/package.json @@ -51,8 +51,10 @@ "gulp-mustache": "0.4.0", "gulp-rename": "1.2.0", "gulp-uglify": "1.0.1", + "husky": "^3.0.8", "ink-docstrap": "1.1.4", "jsdoc": "^3.4.0", + "lint-staged": "^9.4.2", "lodash": "^4.6.1", "mocha": "^3.2.0", "node-minify": "*", @@ -63,5 +65,17 @@ }, "license": "MIT", "main": "index.js", - "dependencies": {} + "dependencies": {}, + "husky": { + "hooks": { + "pre-commit": "./node_modules/.bin/lint-staged", + "pre-push": "npm test" + } + }, + "lint-staged": { + "**/*.js": [ + "./node_modules/.bin/eslint --fix", + "git add" + ] + } } -- cgit v1.2.3