Skip to content

Commit

Permalink
chore: add husky pre-commit hook
Browse files Browse the repository at this point in the history
  • Loading branch information
Patai5 committed May 1, 2024
1 parent 33e80dc commit 21b9229
Show file tree
Hide file tree
Showing 3 changed files with 529 additions and 1 deletion.
14 changes: 14 additions & 0 deletions code/.husky/pre-commit
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
cd code
echo "pre-commit: typechecking, linting, testing & validating schemas"

npm test
# We typecheck & lint last when we know our code works
npx tsc --noEmit
npx lint-staged

cd ../actors
# Validates schemas in parallel with 8 processes
# each opens separate shell with a command in quotes
ls | xargs -P 8 -I {} sh -c 'cd {} && apify vis'

echo "pre-commit: passed"
Loading

0 comments on commit 21b9229

Please sign in to comment.