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
Linting doesn't work on Windows when node_modules is present in folder #5780
Comments
|
I understand that happens, but in my case I still had a file with lint errors outside the |
I suppose it should, because initially the same command caught errors in it:
|
Thanks @filipesilva for the detailed report! I was able to reproduce this on a mac too. It's not directly related to
Note it's erroring for |
Also note
|
I think the correct glob syntax is
I'm not sure why |
@platinumazure I tried that and it doesn't work either. |
I can confirm that I tried with |
@alberto @filipesilva My mistake, then. It seems pretty likely that we have a bug. |
@filipesilva eslint filters for |
Ah that is great to hear! I tried using Thank you! |
Are we handling patterns starting with |
@ilyavolodin the bug in |
I think I see where you're going with this, and it's totally possible. Maybe this line needs to be changed to: addPattern(this.ig.default, [".*", "!../", "!./"]); My previous assumption for why the final |
@ilyavolodin @IanVS It doesn't |
Ok, after digging into this, I don't think it is a bug. If you use a glob in the command line, it turns out the shell with expand the globs (at least on UNIX). So
Note this differs from node's The proper way to pass an unexpanded glob in the commandline is by quoting it:
|
I assume the reason you're using single quotes is to ensure the shell won't
|
Yes, by quoting it, the argument is passed as a literal.
|
Would just like to say thanks for all the help. You found a solution for my issue, got to the bottom of it and even added docs. Very cool. Cheers! |
What version of ESLint are you using?
v2.6.0
What parser (default, Babel-ESLint, etc.) are you using?
default
Please show your full configuration:
What did you do? Please include the actual source code causing the issue.
What did you expect to happen?
I expected that running
eslint ./**/*.js
the second time would show the same result as the first time.What actually happened? Please include the actual, raw output from ESLint.
Nothing was shown when running the command a second time.
This was run on a win10 machine using githbash.
The text was updated successfully, but these errors were encountered: