Run linter before pushing to git (#4962)
Co-authored-by: Ernesto García <ernestognw@gmail.com>
This commit is contained in:
7
.githooks/pre-push
Executable file
7
.githooks/pre-push
Executable file
@ -0,0 +1,7 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
set -euo pipefail
|
||||
|
||||
if [ "${CI:-"false"}" != "true" ]; then
|
||||
npm run lint
|
||||
fi
|
||||
@ -13,6 +13,7 @@
|
||||
"coverage": "env COVERAGE=true hardhat coverage",
|
||||
"docs": "npm run prepare-docs && oz-docs",
|
||||
"docs:watch": "oz-docs watch contracts docs/templates docs/config.js",
|
||||
"prepare": "git config --local core.hooksPath .githooks",
|
||||
"prepare-docs": "scripts/prepare-docs.sh",
|
||||
"lint": "npm run lint:js && npm run lint:sol",
|
||||
"lint:fix": "npm run lint:js:fix && npm run lint:sol:fix",
|
||||
|
||||
Reference in New Issue
Block a user