-
-
Notifications
You must be signed in to change notification settings - Fork 429
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
confusion with file patterns #115
Comments
This is probably a regression. Could you create a PR with the suggested change please? We should add tests for absolute and relative paths. |
rodneyrehm
added a commit
to rodneyrehm/lint-staged
that referenced
this issue
Dec 30, 2016
sure, #116 contains the fix and adapted tests. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
My package.json looks as follows:
My directory structure looks as follows:
I'm trying to commit
alpha.js
andsrc/bravo/charlie.js
and expect both patterns given inlint-staged
to each match one pattern, considering everything is relative to CWD. However neither matches.If I prefix the patterns with
**/
the files are matched. That's because the paths handed to minimatch are made absolute based ongitDir
but not made relative against CWD again. The test suggests this is an oversight, or the test is mislabeled.my linters are engaged properly, if I replace the
resolvePaths.js
with the following:The text was updated successfully, but these errors were encountered: