-
-
Notifications
You must be signed in to change notification settings - Fork 412
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
Working relative to package.json, not git directory #373
Comments
Hey @thedamon, thanks for opening the issue. The docs were incorrect as it was not updated correctly in the PR which deprecated From what I can see, you have a multi-project monorepo. You should check out okonet/lint-staged#how-to-use-lint-staged-in-a-multi-package-monorepo and the example repo - https://github.com/sudo-suhas/lint-staged-multi-pkg which explain in more detail the ways you could use |
Thanks! i read through some of the issues related to the removal of gitdir but maybe not close enough as i didn't properly come away thinking the behaviour would have changed... we don't actually have a package.json in the project root (it's a java based CMS and our team is working just on the front end assets), but maybe we should weigh the advantages of adding one. in the meantime I'll just act as if your PR is merged and cross my fingers! |
I see. A |
@thedamon that shouldn't be a problem. The latest version works differently and the documentation PR is on the way (#374 — thanks @sudo-suhas for working on it!) so you should be able to add lint-staged and husky to your front-end project inside the bigger git project and make paths (or just keep it simple and use As @sudo-suhas mentioned, husky will overwrite |
The docs state:
"The paths used for filtering via minimatch are relative to the directory that contains the .git directory"
But using 6.0.0, that's not the behaviour I'm seeing.
Structure
This config:
is picking up the change to
/project/front-end/subproject/scripts/file.js
Is that expected and I misread the docs? Or is this a bug, or potentially being interrupted by something else.. I have no other hooks and not sure what would be interfering (using husky)
The text was updated successfully, but these errors were encountered: