-
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.
feat: remove husky and lint-staged in favor of lefthook (#404)
* feat: remove husky and lint-staged in favor of lefthook * chore: unset git previous git hooks that added husky back * chore: use correct script name
- Loading branch information
Showing
8 changed files
with
160 additions
and
409 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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,18 @@ | ||
pre-commit: | ||
parallel: true | ||
commands: | ||
eslint: | ||
glob: '*.{js,ts,jsx,tsx}' | ||
run: yarn lint {staged_files} | ||
typescript: | ||
run: yarn lint:ts | ||
tests: | ||
run: yarn test {staged_files} --findRelatedTests --passWithNoTests --coverage=false | ||
|
||
commit-msg: | ||
commands: | ||
'lint commit message': | ||
run: yarn run commitlint --edit {1} | ||
|
||
post-checkout: | ||
scripts: './scripts/post-checkout.sh' |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
#!/usr/bin/env bash | ||
|
||
# $1 - Previous HEAD ref | ||
# $2 - New HEAD ref | ||
# $3 - Flag indicating if checkout was branch/file | ||
|
||
# Only run on branch checkout, not file checkout | ||
if [ "$3" = "1" ]; then | ||
echo 'Checking for changes in yarn.lock...' | ||
|
||
# Compare yarn.lock between old and new refs | ||
if git diff --name-only $1 $2 | grep -q "^yarn.lock$"; then | ||
echo "📦 yarn.lock changed. Run yarn to bring your dependencies up to date." | ||
yarn | ||
fi | ||
|
||
echo 'You are up to date :)' | ||
fi | ||
|
||
echo 'If necessary, you can generate again the native code.' | ||
|
||
exit 0 |
Oops, something went wrong.