SublimeLinter-eslint icon indicating copy to clipboard operation
SublimeLinter-eslint copied to clipboard

Refuses to lint anything under `node_modules`

Open pags opened this issue 1 year ago • 3 comments

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

pags avatar Jun 15 '24 19:06 pags

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. 🤞

kaste avatar Jun 17 '24 14:06 kaste

Appreciate the reply. Confused by two things:

  1. "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...

pags avatar Jun 17 '24 17:06 pags

"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 !).

kaste avatar Jun 17 '24 20:06 kaste