Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 21 additions & 0 deletions .githooks/pre-commit
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
#!/usr/bin/env bash

set -euo pipefail

if [ "${CI:-"false"}" != "true" ]; then
npm run test:generation

# Lint javascript and typescript
for file in $(git diff --cached --name-only | grep -E '\.(js|ts)$')
do
npx prettier --log-level warn --ignore-path .gitignore $file --check
npx eslint $file
done

# Lint solidity
for file in $(git diff --cached --name-only | grep -E '(contracts|test)/.*\.sol$')
do
npx prettier --log-level warn --ignore-path .gitignore $file --check
npx solhint $file
done
fi
8 changes: 0 additions & 8 deletions .githooks/pre-push

This file was deleted.

Loading