Skip to content

Commit 93c9e44

Browse files
committed
run lint before pushing
1 parent b75dd83 commit 93c9e44

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
@@ -7,6 +7,7 @@
77
"!/contracts/mocks/**/*"
88
],
99
"scripts": {
10+
"prepare": "git config --local core.hooksPath .githooks",
1011
"compile": "hardhat compile",
1112
"lint": "prettier --log-level warn --ignore-path .gitignore '{contracts,test}/**/*.sol' --check",
1213
"lint:fix": "prettier --log-level warn --ignore-path .gitignore '{contracts,test}/**/*.sol' --write",

0 commit comments

Comments
 (0)