diff --git a/.husky/lint-staged.config.json b/.husky/lint-staged.config.json new file mode 100644 index 0000000..57227fc --- /dev/null +++ b/.husky/lint-staged.config.json @@ -0,0 +1,3 @@ +{ + "*.{js,json,sol,ts}": "prettier --write" +} diff --git a/.husky/pre-commit b/.husky/pre-commit new file mode 100755 index 0000000..3b432df --- /dev/null +++ b/.husky/pre-commit @@ -0,0 +1,4 @@ +#!/usr/bin/env sh +. "$(dirname -- "$0")/_/husky.sh" + +npx lint-staged --config .husky/lint-staged.config.json diff --git a/package.json b/package.json index dba181e..d5280cd 100644 --- a/package.json +++ b/package.json @@ -39,7 +39,8 @@ "hardhat-contract-sizer": "^2.6.1", "hardhat-deploy": "^0.11.15", "hardhat-gas-reporter": "^1.0.9", - "minimist": "^1.2.7", + "husky": "^8.0.2", + "lint-staged": "^13.0.4", "prettier": "^2.7.1", "prettier-plugin-solidity": "^1.0.0", "solidity-coverage": "^0.8.2",