Run linter before pushing to git (#4962)

Co-authored-by: Ernesto García <ernestognw@gmail.com>
This commit is contained in:
Hadrien Croubois
2024-03-21 18:47:01 +01:00
committed by GitHub
parent e203e02523
commit 976a3d5362
2 changed files with 8 additions and 0 deletions

7
.githooks/pre-push Executable file
View File

@ -0,0 +1,7 @@
#!/usr/bin/env bash
set -euo pipefail
if [ "${CI:-"false"}" != "true" ]; then
npm run lint
fi

View File

@ -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",