diff --git a/.husky/.gitignore b/.husky/.gitignore new file mode 100644 index 00000000..31354ec1 --- /dev/null +++ b/.husky/.gitignore @@ -0,0 +1 @@ +_ diff --git a/.husky/pre-commit b/.husky/pre-commit new file mode 100755 index 00000000..745e3604 --- /dev/null +++ b/.husky/pre-commit @@ -0,0 +1,4 @@ +#!/bin/sh +. "$(dirname $0)/_/husky.sh" + +npm run format \ No newline at end of file diff --git a/package-lock.json b/package-lock.json index 21a181c2..6369d916 100644 --- a/package-lock.json +++ b/package-lock.json @@ -15010,6 +15010,11 @@ "resolved": "https://registry.npmjs.org/human-signals/-/human-signals-1.1.1.tgz", "integrity": "sha512-SEQu7vl8KjNL2eoGBLF3+wAjpsNfA9XMlXAYj/3EdaNfAlxKthD1xjEQfGOUhllCGGJVNY34bRr6lPINhNjyZw==" }, + "husky": { + "version": "5.0.6", + "resolved": "https://registry.npmjs.org/husky/-/husky-5.0.6.tgz", + "integrity": "sha512-SM+evfvcHT3rAYJKvPlatz3L5RqzgeM6xIvDjhs8VuhKj6iKqFDOt/Ov8sPjvWuE4FDB385gJBwWXRj7G3c1hg==" + }, "iconv-lite": { "version": "0.4.24", "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.24.tgz", diff --git a/package.json b/package.json index e50e30a2..0f37ee27 100644 --- a/package.json +++ b/package.json @@ -69,6 +69,7 @@ "eslint-config-oceanprotocol": "^1.5.0", "eslint-config-prettier": "^7.1.0", "eslint-plugin-prettier": "^3.3.1", + "husky": "^5.0.6", "markdownlint-cli": "^0.26.0", "node-sass": "^5.0.0", "npm-run-all": "^4.1.5",