New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Get rid of gitDir
config option and be smart about it
#271
Get rid of gitDir
config option and be smart about it
#271
Comments
Is it as simple as keep looking in the parent directory until you encounter a git repo? |
Well, that's why I created the issue. I don't know yet but it seems like it. I'm probably missing something. For instance there are users with a very unconventional setup #232 so I don't know how it will affect them yet. |
If you are going to make this change you'll also want to change the way the glob patterns are matched (changing the root dir to the actual |
@FezVrasta I'm not sure about that... Why do you think so? Let's keep this discussion inside your original issue. |
The git dir can be found the same way |
@frontsideair yeah, that is what I was thinking about. I'm not concerned about the implementation but about possible side-effects for some users. But it seems to be safe. |
gitDir
config option and be smart about itgitDir
config option and be smart about it
Anything I can do to help move this along? Looking at using lerna, yarn workspaces, husky and lint-staged together with multiple packages stored in |
@mattfysh do you think the proposed solution will work? You could create a PR by looking at how husky does it. Probably there is an npm package to do that ;) |
I think I'll try to tackle this over the weekend using:
|
* remove gitDir config option and close #271 * cleanup tests * update based on feedback * update message for gitDir * add snapshot test for gitDir config * updated based on feedback * Minor whitespace adjustment for deprecation msg
* Remove `gitDir` config option * Automatically resolve `.git` directory in the project Closes #271 BREAKING CHANGE: `gitDir` option deprecated and will be ignored
Ideally, users with complex setup should not suffer trying to setup lint-staged right. There are plenty of issues related just to that:
gitDir
usage? #270etc.
I'm wondering if resolving to git root and taking care of execution context automatically would make
gitDir
option obsolete and solve all those issues and make the DX even better?⚠︎ This issue is meant to be a discussion before proceeding with the actual implementation.
cc @ai @FezVrasta
The text was updated successfully, but these errors were encountered: