-
-
Notifications
You must be signed in to change notification settings - Fork 422
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
File matching a parent directory #487
Comments
See #425 I had the same issue but settled on using 4.x until @sudo-suhas adds a flag to disable
I think it has garnered enough interest to warrant this change. |
I'd be open to a PR which adds a flag for disabling the |
I agree, The one caveat is we usually do custom module development in PHP which I would like to run phpcs against, but those modules live in some parent directories as described in my OP. To your comment in 425, our use case is the project is always organized the exact same way, but I would say the majority if projects you are correct in it should not assume out of scope organization. My other option would be to move package.json to webroot, but that would require some initial changes to our gulpfile which is what I was trying to avoid. |
This use case is now supported via |
awesome, thank you very much! |
@sudo-suhas looking at your note:
Am I understanding that the change committed in #425 can't use pattern matching in the parent folders? If I am understanding that correctly, that means I would have to define exactly which file to lint? Can you confirm that my original question will work with this commit? |
never mind, I understand your note now. You mean specifically |
I just have a question of file matching and dont even know if this is possible. I have my package.json in a subfolder
/docroot/themes/custom/my_theme/package.json
and I am using lint-staged to run some precommit git hooks, but I cant get the file pattern matching to work for files that are in parent directories.I want to search for files in
/docroot/modules/custom/**/*.php
I have tried
and I cannot get any of them to match files. My git root is in the
/docroot
folder. Any ideas?The text was updated successfully, but these errors were encountered: