Skip to content
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

Refuses to lint anything under node_modules #336

Open
pags opened this issue Jun 15, 2024 · 3 comments
Open

Refuses to lint anything under node_modules #336

pags opened this issue Jun 15, 2024 · 3 comments

Comments

@pags
Copy link

pags commented Jun 15, 2024

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

@kaste
Copy link
Contributor

kaste commented Jun 17, 2024

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

@pags
Copy link
Author

pags commented Jun 17, 2024

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

@kaste
Copy link
Contributor

kaste commented Jun 17, 2024

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants