Add lefthook for linting and testing hooks, and optional pre-commit hook via local (#7)
* unbreak package lock * lint * add lefthook for prepush test and lint hook * attempt at exiting 0 if we made a change in lint * fix lint * add fail text * pre-commit test * adjust autofix * add lefthook example * fix comment
This commit is contained in:
parent
e751676b04
commit
44a2732b53
1 changed files with 207 additions and 1 deletions
10
lefthook-local.example.yml
Normal file
10
lefthook-local.example.yml
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
# Optional local lefthook configuration
|
||||
# To enable this:
|
||||
# cp lefthook-local.example.yml lefthook-local.yml
|
||||
|
||||
# Uncomment to add pre-commit hook for automatic linting on staged files:
|
||||
pre-commit:
|
||||
commands:
|
||||
lint:
|
||||
run: npm run lint:fix {staged_files}
|
||||
stage_fixed: true
|
||||
Loading…
Reference in a new issue