As per the title.
I've been trying various incantations such as: let g:ale_linters = {'javascript': ['eslint']} but to no avail; each time it either uses jshint or, if I break it, nothing.
What I've tried
let g:ale_linters = {'javascript': []} also uses jshint. We'd expect it to use nothinglet g:ale_linters = {'javascript': ['jscs']} also uses jshintlet g:ale_linter_aliases = {'javascript.jsx': 'javascript', 'jsx': 'javascript'} let g:ale_javascript_eslint_executable = '/foo/blah.../node_modules/.bin/eslint'Try installing eslint globally with npm install -g eslint instead. There's no support at the moment for using the version of eslint from node_modules. Support hasn't been written for that yet.
Thanks. That's actually what I started with before trying to aim for a specific binary in case it was that. No luck there either I'm afraid
i was writting a similar issue right now, are you using macvim?
MacVim 8.0 (112) installed via brew
Updating issue title.
Are you able to run eslint on your file through a regular Vim command like :!eslint --stdin < %?
That command has been very helpful. I suspect my issue is related to my eslint and babel install/config, and not ale. I'll investigate further tomorrow and confirm.
Any progress on this @JofArnold?
Sorry for not replying. I couldn't get to the bottom of it. I suspect it's because ale is reading the local eslintrc in my project but requires the globally-installed npm modules. In my case, my project eslintrc contains configurations which require lots of different plugins - few of which I wish to install globally. In the end rather than investigate further I switched to neomake and that's working fine, but hopefully these comments will help someone.
In my case, running :!eslint --stdin < % i saw that eslint command was not found, so I figure out that my eslint was installed through nvm (/Users/cesar/.nvm/versions/node/v4.3.2/bin/eslint) and my jshint was on /usr/local/bin/jshint, and my macvim was not be able to find that path under the .nvm, and on terminal worked fine, so i had to export my nvm $PATH to macvim could be able to find it, and worked.
This plugin does not yet support loading eslint from node_modules. Support for that is forthcoming.
ALE should now support a version of eslint installed from your node_modules directory. If you install a version of eslint for your project, then that version will be used instead of the global eslint version. If you want to keep using the global version, you can set g:ale_javascript_eslint_use_global to 1. For NVM installed programs, you just have to set g:ale_javascript_eslint_executable to the right path, as always.
This should fix the issues above, so I will close this now.
Most helpful comment
ALE should now support a version of
eslintinstalled from yournode_modulesdirectory. If you install a version of eslint for your project, then that version will be used instead of the global eslint version. If you want to keep using the global version, you can setg:ale_javascript_eslint_use_globalto1. For NVM installed programs, you just have to setg:ale_javascript_eslint_executableto the right path, as always.This should fix the issues above, so I will close this now.