diff --git a/.husky/pre-commit b/.husky/pre-commit new file mode 100644 index 0000000..3867a0f --- /dev/null +++ b/.husky/pre-commit @@ -0,0 +1 @@ +npm run lint diff --git a/.husky/pre-push b/.husky/pre-push new file mode 100644 index 0000000..3fdd1ac --- /dev/null +++ b/.husky/pre-push @@ -0,0 +1 @@ +npm run test:quiet diff --git a/package.json b/package.json index 4e3f7ba..34b969b 100644 --- a/package.json +++ b/package.json @@ -50,7 +50,8 @@ "watch": "mocha --reporter=min --watch --growl", "test:functional": "bash test/functional-test.sh", "test:coverage": "nyc mocha", - "test:all": "npm run lint && npm test && npm run test:functional" + "test:all": "npm run lint && npm test && npm run test:functional", + "prepare": "husky" }, "dependencies": { "adm-zip": "^0.5.10", @@ -74,12 +75,6 @@ "should": "^13.2.3", "sinon": "^19.0.2" }, - "husky": { - "hooks": { - "pre-commit": "npm run lint", - "pre-push": "npm run test:quiet" - } - }, "funding": { "type": "liberapay", "url": "https://liberapay.com/tldr-pages"