Skip to content

Commit

Permalink
Use lefthook instead of husky and lint-staged for git hooks (#978)
Browse files Browse the repository at this point in the history
  • Loading branch information
hustcer committed Jul 11, 2023
1 parent e6ff783 commit b348bfa
Show file tree
Hide file tree
Showing 4 changed files with 250 additions and 1,131 deletions.
4 changes: 0 additions & 4 deletions .husky/pre-commit

This file was deleted.

34 changes: 34 additions & 0 deletions lefthook.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
# EXAMPLE USAGE
# Refer for explanation to following link:
# https://github.com/evilmartians/lefthook/blob/master/docs/configuration.md
#
# pre-push:
# commands:
# packages-audit:
# tags: frontend security
# run: yarn audit
# gems-audit:
# tags: backend security
# run: bundle audit
#
min_version: 1.4.3
no_tty: false
skip_output:
- meta # Skips lefthook version printing
- skips # Skips "skip" printing (i.e. no files matched)
- summary # Skips summary block (successful and failed steps) printing
- success # Skips successful steps printing
- failure # Skips failed steps printing
# - execution # I want to skip all execution printing
- execution_info # Skips printing `EXECUTE > ...` logging
# - execution_out # I don't want to Skip printing successfully executed commands' output
pre-commit:
parallel: true
commands:
fmt:
skip:
- merge
- rebase
stage_fixed: true
glob: "**/*"
run: prettier --write --ignore-unknown {staged_files}

0 comments on commit b348bfa

Please sign in to comment.