-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add Husky to enforce pre-push yarn fmt-check (#50)
- Loading branch information
1 parent
e7469eb
commit 09d1f25
Showing
4 changed files
with
26 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
#!/usr/bin/env sh | ||
set -e | ||
|
||
. "$(dirname -- "$0")/_/husky.sh" | ||
|
||
echo "************************************************************************" | ||
echo "** Running sim-core's 'yarn fmt-check' **" | ||
echo "** If this fails, run 'yarn fmt' and commit your fixes. **" | ||
echo "** (Output is stored in .config/husky/husky.log) **" | ||
echo "** This takes about 10 seconds... **" | ||
echo "************************************************************************" | ||
|
||
cd apps/sim-core || exit 1 | ||
yarn fmt-check > ../../.config/husky/husky.log 2>&1; | ||
|
||
echo "** Formatting check success. **" | ||
echo "************************************************************************" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,7 +8,8 @@ | |
.next | ||
.old/ | ||
.vscode/ | ||
.config/**/*.log | ||
dist/ | ||
node_modules/ | ||
target/ | ||
test_artifacts/ | ||
test_artifacts/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters