Linting doesn't work on Windows when node_modules is present in folder
See original GitHub issueWhat version of ESLint are you using? v2.6.0 What parser (default, Babel-ESLint, etc.) are you using? default Please show your full configuration:
{
"rules": {
"semi": [
2,
"always"
]
}
}
What did you do? Please include the actual source code causing the issue.
filipe.silva@DESKTOP-7ND6T3R MINGW64 /E/sandbox/eslint-test
$ node -v
v4.2.1
filipe.silva@DESKTOP-7ND6T3R MINGW64 /E/sandbox/eslint-test
$ npm -v
2.14.7
filipe.silva@DESKTOP-7ND6T3R MINGW64 /E/sandbox/eslint-test
$ eslint -v
v2.6.0
filipe.silva@DESKTOP-7ND6T3R MINGW64 /E/sandbox/eslint-test
$ ls -la
total 10
drwxr-xr-x 1 filipe.silva filipe.silva 0 Apr 4 12:50 ./
drwxr-xr-x 1 filipe.silva filipe.silva 0 Apr 4 12:36 ../
-rw-r--r-- 1 filipe.silva filipe.silva 89 Apr 4 12:37 .eslintrc.json
-rw-r--r-- 1 filipe.silva filipe.silva 11 Apr 4 12:38 test.js
filipe.silva@DESKTOP-7ND6T3R MINGW64 /E/sandbox/eslint-test
$ cat .eslintrc.json
{
"rules": {
"semi": [
2,
"always"
]
}
}
filipe.silva@DESKTOP-7ND6T3R MINGW64 /E/sandbox/eslint-test
$ cat test.js
var a = 1
filipe.silva@DESKTOP-7ND6T3R MINGW64 /E/sandbox/eslint-test
$ eslint ./**/*.js
E:\sandbox\eslint-test\test.js
1:10 error Missing semicolon semi
✖ 1 problem (1 error, 0 warnings)
filipe.silva@DESKTOP-7ND6T3R MINGW64 /E/sandbox/eslint-test
$ mkdir node_modules
filipe.silva@DESKTOP-7ND6T3R MINGW64 /E/sandbox/eslint-test
$ cp test.js node_modules/test.js
filipe.silva@DESKTOP-7ND6T3R MINGW64 /E/sandbox/eslint-test
$ eslint ./**/*.js
filipe.silva@DESKTOP-7ND6T3R MINGW64 /E/sandbox/eslint-test
$
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.
Issue Analytics
- State:
- Created 7 years ago
- Comments:21 (16 by maintainers)
Top Results From Across the Web
Lint task: doesn't work without `node_modules` in workspace ...
I am working on a multiplayer game project, and the client- and server-side logic are included in separate root folders of my repository....
Read more >Eslint not ignoring node_modules folder - Stack Overflow
In my case, ESLint (v7.8.1) was ignoring node_modules directories properly, but not my dist directory. I added this to .eslintignore :
Read more >CLI - Prettier
This command formats all files supported by Prettier in the current directory and its subdirectories. It's recommended to always make sure that prettier...
Read more >Husky - Git hooks
Husky improves your commits and more woof! You can use it to lint your commit messages, run tests, lint code, etc... when you...
Read more >How to Bundle JavaScript With Rollup — Step-by-Step Tutorial
At first, when we run ./node_modules/.bin/rollup -c , nothing seems to be happening. That's because as it stands, the app's code passes the...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
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!
Yes, by quoting it, the argument is passed as a literal.