Skip to content

Commit 976a3d5

Browse files
Amxxernestognw
andauthored
Run linter before pushing to git (#4962)
Co-authored-by: Ernesto García <[email protected]>
1 parent e203e02 commit 976a3d5

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

.githooks/pre-push

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
#!/usr/bin/env bash
2+
3+
set -euo pipefail
4+
5+
if [ "${CI:-"false"}" != "true" ]; then
6+
npm run lint
7+
fi

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
"coverage": "env COVERAGE=true hardhat coverage",
1414
"docs": "npm run prepare-docs && oz-docs",
1515
"docs:watch": "oz-docs watch contracts docs/templates docs/config.js",
16+
"prepare": "git config --local core.hooksPath .githooks",
1617
"prepare-docs": "scripts/prepare-docs.sh",
1718
"lint": "npm run lint:js && npm run lint:sol",
1819
"lint:fix": "npm run lint:js:fix && npm run lint:sol:fix",

0 commit comments

Comments
 (0)