Skip to content

Commit

Permalink
chore: setup husky for pre-commit rules
Browse files Browse the repository at this point in the history
  • Loading branch information
ArtemSBulgakov committed Feb 25, 2024
1 parent 4f14d5c commit 824ed49
Show file tree
Hide file tree
Showing 4 changed files with 618 additions and 3 deletions.
8 changes: 8 additions & 0 deletions .husky/common.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
command_exists () {
command -v "$1" >/dev/null 2>&1
}

# Workaround for Windows 10, Git Bash and Yarn
if command_exists winpty && test -t 1; then
exec < /dev/tty
fi
5 changes: 5 additions & 0 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"
. "$(dirname "$0")/common.sh"

npm run lint-staged
Loading

0 comments on commit 824ed49

Please sign in to comment.