Skip to content

Commit

Permalink
add lefthook config
Browse files Browse the repository at this point in the history
  • Loading branch information
le0pard committed Sep 3, 2023
1 parent 26486fa commit 37d3678
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions lefthook.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
pre-commit:
parallel: true
commands:
eslint:
glob: '*.{js}'
run: yarn eslint {staged_files}

fix:
parallel: true
files: git status --porcelain | cut -c 4- # custom list of files
commands:
js:
glob: '*.{js,jsx}'
run: yarn eslint --fix {files}

0 comments on commit 37d3678

Please sign in to comment.