Skip to content

Commit 21b9229

Browse files
committed
chore: add husky pre-commit hook
1 parent 33e80dc commit 21b9229

File tree

3 files changed

+529
-1
lines changed

3 files changed

+529
-1
lines changed

code/.husky/pre-commit

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
cd code
2+
echo "pre-commit: typechecking, linting, testing & validating schemas"
3+
4+
npm test
5+
# We typecheck & lint last when we know our code works
6+
npx tsc --noEmit
7+
npx lint-staged
8+
9+
cd ../actors
10+
# Validates schemas in parallel with 8 processes
11+
# each opens separate shell with a command in quotes
12+
ls | xargs -P 8 -I {} sh -c 'cd {} && apify vis'
13+
14+
echo "pre-commit: passed"

0 commit comments

Comments
 (0)