Closed dbmzzo closed 7 years ago
Maybe ALE is using a different version of eslint
from a node_modules
directory which doesn't work. Have you tried setting let g:ale_javascript_eslint_use_global = 1
? If that works, you might consider updating your eslint version in node_modules
.
It could be a completely unrelated problem. That's just the most common one.
What's your eslint
version?
let g:ale_javascript_eslint_use_global = 1
worked perfectly. Thanks so much! Love this project!
Aha, I thought it might be that.
What was happens is that ALE looks for versions of eslint
inside of node_modules
automatically. This is useful for sharing the same version of eslint
for a team, but could not be what you want. So that extra option is there to always use whatever global version of eslint
you have instead.
It can be useful to get the local version updated and working if you can, if you're working in a team.
I'll close this issue now that you've got it running.
Im having the same problem. Is there a way to test that ALE is actually executing?
@gaviriar you can use :ALEInfo
command.
Thanks for that Info, when I use the :ALEinfo command i can see the following output:
Current Filetype: python
Available Linters: ['flake8', 'mypy', 'pylint']
Enabled Linters: ['flake8', 'mypy', 'pylint']
So it seems that the linters are being identified, but I don't see any lint warnings or errors when evaluating %{ALEGetStatusLine()}.
Any suggestions on how to debug this?
Could you tell me which version of Vim you are running, which OS you are testing on, and which version of flake8
you are using? If you're on a flake8
version before 3.0.0, you might try pulling ALE from GitHub again, as I just fixed an issue which broke older versions of flake8
today.
Hi,
Thanks for the reply. This is my environment: OS: MacOSX flake8==2.5.1 Vim: 8.0
I updated to the latest tip of master. And now I am seeing the previous issue gone. But now when the linter executes I get the following error messages:
E325: ATTENTION
"Projects/hooklib/Bugzilla.py" [dos] 207L, 7054C
Error detected while processing function ale#Lint:
line 17:
E715: Dictionary required
Error detected while processing function ale#Lint:
line 17:
E715: Dictionary required
I looked at :ALEinfo and this is what I see:
"Projects/hooklib/Bugzilla.py" [dos] 209L, 7058C written
Current Filetype: python
Available Linters: ['0', 'mypy', 'pylint']
Enabled Linters: ['0', 'mypy', 'pylint']
I'm having a similar problem. I'm on Windows, with only python 3.6 installed. Vim is complied with python 3.5 support (not sure if you're shelling out or using Vim's inbuilt python).
The following file has a few flake8 errors (I only have flake8 installed)
import sys
def func():
a = 1+1
if __name__ == "__main__":
pass
ALEInfo:
Current Filetype: python
Available Linters: ['flake8', 'mypy', 'pylint']
Enabled Linters: ['flake8', 'mypy', 'pylint']
@gaviriar Where is that '0'
coming from in the available linters? That's weird. I don't know what's going on with those errors there.
Have you modified the plugin in any way or set any options in your vimrc file?
Hi @w0rp,
Thanks for following up on this. I killed all running vim processes and restarted MacVim and this I did not see the '0' again in the list of available linters.
Think it was an issue with my environment. I can safely confirm that the linter is now working as expected thanks to the fixes you committed.
Sorry for the hassle!
Cool, good to hear. :+1:
Hey, just wanted to say I'm running into this same issue on and Neovim 0.1.7, iTerm2 Build 3.0.14, and macOS 10.12.3. Hoping to switch to your project from neomake. Here are some results from running ALEInfo
.
In elixir:
Current Filetype: elixir
Available Linters: ['credo']
Enabled Linters: ['credo']
Linter Variables:
Global Variables:
let g:ale_echo_cursor = 1
let g:ale_echo_msg_error_str = 'Error'
let g:ale_echo_msg_format = '%s'
let g:ale_echo_msg_warning_str = 'Warning'
let g:ale_enabled = 1
let g:ale_keep_list_window_open = 0
let g:ale_lint_delay = 200
let g:ale_lint_on_enter = 1
let g:ale_lint_on_save = 0
let g:ale_lint_on_text_changed = 1
let g:ale_linter_aliases = {}
let g:ale_linters = {}
let g:ale_open_list = 0
let g:ale_set_highlights = 1
let g:ale_set_loclist = 1
let g:ale_set_quickfix = 0
let g:ale_set_signs = 1
let g:ale_sign_column_always = 0
let g:ale_sign_error = '>>'
let g:ale_sign_offset = 1000000
let g:ale_sign_warning = '--'
let g:ale_statusline_format = ['%d error(s)', '%d warning(s)', 'OK']
let g:ale_warn_about_trailing_whitespace = 1
Command History:
(finished - exit code 1) 'mix credo suggest --format=flycheck --read-from-stdin /Users/anhari/code/elixir/rumbl/web/controllers/user_controller.ex < /var/folders/c7/k799l5bx76j2yd9l9k5h_w000000gn/T/nvim7rbusZ/5/user_controller.ex'
In ruby:
Current Filetype: ruby
Available Linters: ['rubocop']
Enabled Linters: ['rubocop']
Linter Variables:
let g:ale_ruby_rubocop_options = ''
Global Variables:
let g:ale_echo_cursor = 1
let g:ale_echo_msg_error_str = 'Error'
let g:ale_echo_msg_format = '%s'
let g:ale_echo_msg_warning_str = 'Warning'
let g:ale_enabled = 1
let g:ale_keep_list_window_open = 0
let g:ale_lint_delay = 200
let g:ale_lint_on_enter = 1
let g:ale_lint_on_save = 0
let g:ale_lint_on_text_changed = 1
let g:ale_linter_aliases = {}
let g:ale_linters = {}
let g:ale_open_list = 0
let g:ale_set_highlights = 1
let g:ale_set_loclist = 1
let g:ale_set_quickfix = 0
let g:ale_set_signs = 1
let g:ale_sign_column_always = 0
let g:ale_sign_error = '>>'
let g:ale_sign_offset = 1000000
let g:ale_sign_warning = '--'
let g:ale_statusline_format = ['%d error(s)', '%d warning(s)', 'OK']
let g:ale_warn_about_trailing_whitespace = 1
Command History:
Do you have any other plugins currently installed, like Neomake, Syntastic, etc.? You might have to remove them first.
I do plan to get ALE to co-operate with existing linter plugins, if at all possible: https://github.com/w0rp/ale/wiki/Roadmap#co-operation-with-other-linter-plugins
I do have Syntastic installed since I build on top of thoughtbot's base set of dotfiles, but I disable the inherited syntastic with this:
let g:syntastic_mode_map = {
\ "mode": "passive",
\ "active_filetypes": [],
\ "passive_filetypes": [] }
It's possible that other linter plugins could cause conflicts. I'd try uninstalling them and running ALE again, to see if you still have problems. If you do find another linter plugin which conflicts with ALE, please raise an issue for it. I would like to have it so ALE cooperates with other plugins, if possible.
Maybe ALE is using a different version of
eslint
from anode_modules
directory which doesn't work. Have you tried settinglet g:ale_javascript_eslint_use_global = 1
? If that works, you might consider updating your eslint version innode_modules
.It could be a completely unrelated problem. That's just the most common one.
This also worked for me. Lifesaver! Thanks!
Hello,
I have a strange issue on NeoVim 0.1.7. Ale appears to be installed and running just fine, but does not report any errors, either in the gutter or status line. I currently have everything but
esllnt
disabled, though I have the same problem with the default setup. Running NeoVim with no other plugins enabled didn't fix the problem. I triedpy
files and have the same issue as with the javascript.%{ALEGetStatusLine()}
in my status line readsOK
at all times.:ALEInfo
returns::!:!eslint -f unix --stdin < Header.js
returns:Any help would be appreciated. Thanks!