Refuses to lint anything under `node_modules`
eslint 8.56.0
Works great for anything not under node_modules
Will not lint automatically nor by manual linting for anything under node_modules
.eslintignore contains
!**/node_modules/**
!node_modules
Running eslint . from terminal outside of Sublime reports node_modules files as expected
Honestly, no idea ... just some idea. We actually don't read "eslintignore" or any configuration files. So it just all may rely on the working dir? If you enable debug for SublimeLinter -- use the Command Palette for that, then watch it in Sublime's console -- it will show the exact command plus the working dir we're using here. That might give a first hint. Maybe it can't find the "eslintignore" file from there. 🤞
Appreciate the reply. Confused by two things:
- "debug for SublimeLinter" - I can't seem to find that. Closest is "diagnostics panel" but that doesn't print out anything useful, just
No lint results. Running eslint.
We actually don't read "eslintignore" or any configuration files Maybe it can't find the "eslintignore" file from there.
So it does or doesn't look for/read .eslintignore ? I'm almost certain this was working at some point...
"debug for SublimeLinter" - I can't seem to find that.
🙄 It's my own command. You have to manually set it in the SublimeLinter settings. Sorry. (Or install my command: https://github.com/kaste/SublimeLinter-addon-toggler)
We don't evaluate eslintignore, but we send eslint the filename of the view, and eslint should look it up, shouldn't it. Have you maybe used
// Exclude files that match the given pattern(s).
"excludes": [],
in your SublimeLinter settings at some point because that does a similar thing (and also allows negation using !).