-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
Add option to disable eslint if not configured/explicitly installed #1746
Comments
I've noticed the exact same problem. |
Every time I work on a project using FYI, this has been approved in #940. Somebody so inclined can make a PR.
|
The main reason this hasn't been done is that it's not easy. Most answers I see involve, "Well, let's just scan this large set of different project files all in the space of a few milliseconds, which require more time than that in I/O time, and use that to determine what to run." What I suggest for now is using the bufffer-local options to turn some linters on or off. You can use |
What I proposed here will help with this type of problem: #2132 When that is all implemented, it will be possible to do a lot more processing of things like project settings in the background. That will mean it will still take longer to get linter results if options for enabling that type of processing are enabled, but the hard work will not block editing in Vim. |
Hi @w0rp Thanks for this great project. Quick question. has this been fixed? I still get a |
I'm going to close this, as I don't think it's a good idea. I don't want ALE to do any detection of projects with asynchronous jobs to determine which linters to run, as the delay will be too long. Instead I suggest configuring your settings for different projects. |
If I use
xo
in a javascript project, it will installeslint
as a dependency. As a result,ale
will correctly identify theeslint
executable in my./node_modules/
folder, and runeslint
, even though I don't have any configuration for it. This results in errors fromeslint
, even though the actual linter I'm using (xo
) does not report any errors.Here are some ideas how one could avoid the above issue.
eslint
is installed explicitly inpackage.json
.eslint
, either in one of the configuration files or through theeslintConfig
key inpackage.json
Either of those checks would only be performed if a certain
let g:
option is set. If whatever check is performed concludes thateslint
isn't explicitly installed/configured, it's not used.I'm aware that I could disable
eslint
entirely, but I do use it for some projects, so that wouldn't solve my problem. I also checked the current options for theeslint
linter but none of them appear to help.The text was updated successfully, but these errors were encountered: