Replies: 1 comment
-
This is a good idea. I notice that lefthook is being used widely in monorepos but lefthook does not offer enough instruments for them. I will consider this approach but this is not the top priority right now. If you have a will you can submit a PR and I'll be happy to review and merge this feature! |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I'm working in a sort of monorepo, where there are multiple projects in a larger repository. I want the tests for a subproject to be defined in the project's subdirectory.
This is how I made it work: in the main directory, I have a
lefthook.toml
file withextends
referring to alefthook.toml
file in the subdirectory. The filepath/to/subproject/lefthook.toml
looks like this:I don't like having to specify the subdirectory (
path/to/subproject/
) in each entry, since the subproject should not be affected by its place in the hierarchy.I thought of a way to fix this: Allow writing a variable, say
{mydir}
, inroot
, which will be replaced with the directory containing the source config file. Then, I would be able to have justroot = "{mydir}"
for each entry, instead of repeating the subdir.WDYT?
Beta Was this translation helpful? Give feedback.
All reactions