Replies: 1 comment 2 replies
-
You can use YAML anchors for this purpose:
Or you can explicitly call custom hooks: # lefthook.yml
validate:
commands:
# ...
pre-push:
commands:
validate:
run: lefthook run validate |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I have a
validate
task that lints, checks types etc., and I'd like to reuse that in mypre-push
hook as well, but I have to settle for:which doesn't provide a command-by-command experience that I would have seen if I had written each command individually. What I'm looking for is something like this:
This way lefthook can copy over the entire configuration, and I can also run it in
npm run validate
if I wanted to etc.Beta Was this translation helpful? Give feedback.
All reactions