diff --git a/.husky/.gitignore b/.husky/.gitignore new file mode 100644 index 0000000..31354ec --- /dev/null +++ b/.husky/.gitignore @@ -0,0 +1 @@ +_ diff --git a/.husky/pre-push b/.husky/pre-push new file mode 100755 index 0000000..20d0d06 --- /dev/null +++ b/.husky/pre-push @@ -0,0 +1,4 @@ +#!/bin/sh +. "$(dirname "$0")/_/husky.sh" + +npm run lint diff --git a/package-lock.json b/package-lock.json index 1a6e342..2adf4c9 100644 --- a/package-lock.json +++ b/package-lock.json @@ -3385,6 +3385,12 @@ "integrity": "sha512-H2iMtd0I4Mt5eYiapRdIDjp+XzelXQ0tFE4JS7YFwFevXXMmOp9myNrUvCg0D6ws8iqkRPBfKHgbwig1SmlLfg==", "dev": true }, + "husky": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/husky/-/husky-6.0.0.tgz", + "integrity": "sha512-SQS2gDTB7tBN486QSoKPKQItZw97BMOd+Kdb6ghfpBc0yXyzrddI0oDV5MkDAbuB4X2mO3/nj60TRMcYxwzZeQ==", + "dev": true + }, "ignore": { "version": "4.0.6", "resolved": "https://registry.npmjs.org/ignore/-/ignore-4.0.6.tgz", diff --git a/package.json b/package.json index e5679c3..a45330a 100644 --- a/package.json +++ b/package.json @@ -13,7 +13,7 @@ "scripts": { "prettier": "prettier --write lib", "lint": "eslint lib test", - "pretest": "npm run lint && npm run build", + "pretest": "npm run build", "build": "babel lib -d dist", "test": "tape test", "test:coverage": "nyc npm test" @@ -37,6 +37,7 @@ "eslint-plugin-import": "^2.22.1", "eslint-plugin-node": "^11.1.0", "eslint-plugin-promise": "^4.3.1", + "husky": "^6.0.0", "nyc": "^15.1.0", "prettier": "^2.2.1", "sinon": "^10.0.0",