Closed tylerthehaas closed 7 years ago
Which vesrion of eslint
are you using?
v3.16.1
What is the output of eslint -f unix --stdin --stdin-filename /Users/thaas/learning/React/Jest/TestTodo/src/App.js < /Users/thaas/learning/React/Jest/TestTodo/src/App.js
from your terminal? Maybe something is wrong there.
Also, are any other linting plugins installed?
It actually started working. I'm not actually sure what was wrong or what fixed it but I'll close this issue.
Turns out I can only get it to work in one project. when I run ALEInfo in the working project I get:
Current Filetype: javascript
Available Linters: ['eslint', 'flow', 'jscs', 'jshint', 'standard', 'xo']
Enabled Linters: ['eslint', 'flow', 'jscs', 'jshint', 'standard', 'xo']
Linter Variables:
let g:ale_javascript_eslint_executable = 'eslint'
let g:ale_javascript_eslint_options = ''
let g:ale_javascript_eslint_use_global = 0
let g:ale_javascript_flow_executable = 'flow'
let g:ale_javascript_flow_use_global = 0
let g:ale_javascript_jshint_executable = 'jshint'
let g:ale_javascript_jshint_use_global = 0
let g:ale_javascript_standard_executable = 'standard'
let g:ale_javascript_standard_options = ''
let g:ale_javascript_standard_use_global = 0
let g:ale_javascript_xo_executable = 'xo'
let g:ale_javascript_xo_options = ''
let g:ale_javascript_xo_use_global = 0
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', '🚩 %d', '']
let g:ale_warn_about_trailing_whitespace = 1
Command History:
(finished - exit code 0) ['/bin/zsh', '-c', '/Users/thaas/Projects/Monsanto/capacity-ontap-ui/node_modules/.bin/eslint -f unix --stdin --stdin-filename /Users/thaas/Projects/Monsanto/capacity-ontap-ui/src/components/presentation/holds/create.jsx < /var/folders/rv/l95_5q0s3gx2sxdjyxtnlzbn3fd4n8/T/vbafxKz/3/create.jsx']
(finished - exit code 1) ['/bin/zsh', '-c', '/Users/thaas/Projects/Monsanto/capacity-ontap-ui/node_modules/.bin/eslint -f unix --stdin --stdin-filename /Users/thaas/Projects/Monsanto/capacity-ontap-ui/src/components/presentation/holds/create.jsx < /var/folders/rv/l95_5q0s3gx2sxdjyxtnlzbn3fd4n8/T/vbafxKz/4/create.jsx']
(finished - exit code 0) ['/bin/zsh', '-c', '/Users/thaas/Projects/Monsanto/capacity-ontap-ui/node_modules/.bin/eslint -f unix --stdin --stdin-filename /Users/thaas/Projects/Monsanto/capacity-ontap-ui/src/components/presentation/holds/create.jsx < /var/folders/rv/l95_5q0s3gx2sxdjyxtnlzbn3fd4n8/T/vbafxKz/5/create.jsx']
you'll notice the first line goes to a path of '/usres/thaas/Projects/Monsanto/capacity-ontap-ui/node_modules/.bin/eslint' In other projects which arent working I do not get that line. That is the only difference between projects that I have been able to find. Here is the output from a nonworking directory.
Current Filetype: javascript
Available Linters: ['eslint', 'flow', 'jscs', 'jshint', 'standard', 'xo']
Enabled Linters: ['eslint', 'flow', 'jscs', 'jshint', 'standard', 'xo']
Linter Variables:
let g:ale_javascript_eslint_executable = 'eslint'
let g:ale_javascript_eslint_options = ''
let g:ale_javascript_eslint_use_global = 0
let g:ale_javascript_flow_executable = 'flow'
let g:ale_javascript_flow_use_global = 0
let g:ale_javascript_jshint_executable = 'jshint'
let g:ale_javascript_jshint_use_global = 0
let g:ale_javascript_standard_executable = 'standard'
let g:ale_javascript_standard_options = ''
let g:ale_javascript_standard_use_global = 0
let g:ale_javascript_xo_executable = 'xo'
let g:ale_javascript_xo_options = ''
let g:ale_javascript_xo_use_global = 0
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', '🚩 %d', '']
let g:ale_warn_about_trailing_whitespace = 1
Command History:
(finished - exit code 1) ['/bin/zsh', '-c', 'eslint -f unix --stdin --stdin-filename /Users/thaas/learning/React/Jest/TestTodo/src/App.jsx < /var/folders/rv/l95_5q0s3gx2sxdjyxtnlzbn3fd4n8/T/vM31svw/3/App.jsx']
(finished - exit code 1) ['/bin/zsh', '-c', 'eslint -f unix --stdin --stdin-filename /Users/thaas/learning/React/Jest/TestTodo/src/App.jsx < /var/folders/rv/l95_5q0s3gx2sxdjyxtnlzbn3fd4n8/T/vM31svw/4/App.jsx']
(finished - exit code 1) ['/bin/zsh', '-c', 'eslint -f unix --stdin --stdin-filename /Users/thaas/learning/React/Jest/TestTodo/src/App.jsx < /var/folders/rv/l95_5q0s3gx2sxdjyxtnlzbn3fd4n8/T/vM31svw/5/App.jsx']
(started) ['/bin/zsh', '-c', 'eslint -f unix --stdin --stdin-filename /Users/thaas/learning/React/Jest/TestTodo/src/App.jsx < /var/folders/rv/l95_5q0s3gx2sxdjyxtnlzbn3fd4n8/T/vM31svw/6/App.jsx']
(finished - exit code 1) ['/bin/zsh', '-c', 'eslint -f unix --stdin --stdin-filename /Users/thaas/learning/React/Jest/TestTodo/src/App.jsx < /var/folders/rv/l95_5q0s3gx2sxdjyxtnlzbn3fd4n8/T/vM31svw/7/App.jsx']
I'm curious what happens if you add this to your .vimrc
to restrict the JavaScript linters to just eslint and flow:
let g:ale_linters = {
\ 'javascript': ['eslint', 'flow'],
\}
Still doesn't work Mark. I did find out that there wasn't an eslint in my node_modules/.bin on my local project. I added it through npm instead of yarn (there is a issue with putting yarn packages in your bin right now) and the output now matches what was being outputted from capacaty-ontap-ui directory (the working one).
here is the new output with the changes mark suggested:
Current Filetype: javascript
Available Linters: ['eslint', 'flow', 'jscs', 'jshint', 'standard', 'xo']
Enabled Linters: ['eslint']
Linter Variables:
let g:ale_javascript_eslint_executable = 'eslint'
let g:ale_javascript_eslint_options = ''
let g:ale_javascript_eslint_use_global = 0
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 = {'javascript': ['eslint']}
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', '🚩 %d', '']
let g:ale_warn_about_trailing_whitespace = 1
Command History:
(finished - exit code 1) ['/bin/zsh', '-c', '/Users/thaas/learning/React/Jest/TestTodo/node_modules/.bin/eslint -f unix --stdin --stdin-filename /Users/thaas/learning/React/Jest/TestTodo/src/App.jsx < /var/folders/rv/l95_5q0s3gx2sxdjyxtnlzbn3fd4n8/T/viCFu6X/3/App.jsx']
(finished - exit code 1) ['/bin/zsh', '-c', '/Users/thaas/learning/React/Jest/TestTodo/node_modules/.bin/eslint -f unix --stdin --stdin-filename /Users/thaas/learning/React/Jest/TestTodo/src/App.jsx < /var/folders/rv/l95_5q0s3gx2sxdjyxtnlzbn3fd4n8/T/viCFu6X/4/App.jsx']
(finished - exit code 1) ['/bin/zsh', '-c', '/Users/thaas/learning/React/Jest/TestTodo/node_modules/.bin/eslint -f unix --stdin --stdin-filename /Users/thaas/learning/React/Jest/TestTodo/src/App.jsx < /var/folders/rv/l95_5q0s3gx2sxdjyxtnlzbn3fd4n8/T/viCFu6X/5/App.jsx']
also when I run eslint -f unix --stdin --stdin-filename /Users/thaas/learning/React/Jest/TestTodo/src/App.jsx < /var/folders/rv/l95_5q0s3gx2sxdjyxtnlzbn3fd4n8/T/vM31svw/3/App.jsx
in the terminal I get
no such file or directory: /var/folders/rv/l95_5q0s3gx2sxdjyxtnlzbn3fd4n8/T/vM31svw/3/App.jsx
I was able to get it to work correctly when there is a local .eslintrc.json
file but if it has to rely on my global one then it stops working.
This was an error in my .eslintrc.json throwing an error.
I might see if I can get the handler for eslint
to parse broken configuration file errors, and then report those in files. That might help with configuring eslint
.
Got the same here. Without setting eslint as my JS default linter, I get jslint reports, but forcing ale to use eslint returns nothing.
Current Filetype: javascript
Available Linters: ['eslint', 'flow', 'jscs', 'jshint', 'standard', 'xo']
Enabled Linters: ['eslint']
Linter Variables:
let g:ale_javascript_eslint_executable = 'eslint'
let g:ale_javascript_eslint_options = ''
let g:ale_javascript_eslint_use_global = 0
Global Variables:
let g:ale_echo_cursor = 1
let g:ale_echo_msg_error_str = 'E'
let g:ale_echo_msg_format = '[%linter%] %s [%severity%]'
let g:ale_echo_msg_warning_str = 'W'
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 = {'javascript': ['eslint']}
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) '/home/decko/node_modules/.bin/eslint -f unix --stdin --stdin-filename /home/decko/dev/epracas-frontend/src/js/praca/vinculacao.controller.js < /tmp/nvimsxUj7R/713/vinculacao.controller.js'
(started) '/home/decko/node_modules/.bin/eslint -f unix --stdin --stdin-filename /home/decko/dev/epracas-frontend/src/js/praca/vinculacao.controller.js < /tmp/nvimsxUj7R/714/vinculacao.controller.js'
(finished - exit code 1) '/home/decko/node_modules/.bin/eslint -f unix --stdin --stdin-filename /home/decko/dev/epracas-frontend/src/js/praca/vinculacao.controller.js < /tmp/nvimsxUj7R/715/vinculacao.controller.js'
(started) '/home/decko/node_modules/.bin/eslint -f unix --stdin --stdin-filename /home/decko/dev/epracas-frontend/src/js/praca/vinculacao.controller.js < /tmp/nvimsxUj7R/716/vinculacao.controller.js'
(finished - exit code 1) '/home/decko/node_modules/.bin/eslint -f unix --stdin --stdin-filename /home/decko/dev/epracas-frontend/src/js/praca/vinculacao.controller.js < /tmp/nvimsxUj7R/717/vinculacao.controller.js'
(finished - exit code 1) '/home/decko/node_modules/.bin/eslint -f unix --stdin --stdin-filename /home/decko/dev/epracas-frontend/src/js/praca/vinculacao.controller.js < /tmp/nvimsxUj7R/721/vinculacao.controller.js'
(finished - exit code 1) '/home/decko/node_modules/.bin/eslint -f unix --stdin --stdin-filename /home/decko/dev/epracas-frontend/src/js/praca/vinculacao.controller.js < /tmp/nvimsxUj7R/722/vinculacao.controller.js'
(finished - exit code 1) '/home/decko/node_modules/.bin/eslint -f unix --stdin --stdin-filename /home/decko/dev/epracas-frontend/src/js/praca/vinculacao.controller.js < /tmp/nvimsxUj7R/724/vinculacao.controller.js'
(finished - exit code 1) '/home/decko/node_modules/.bin/eslint -f unix --stdin --stdin-filename /home/decko/dev/epracas-frontend/src/js/praca/vinculacao.controller.js < /tmp/nvimsxUj7R/726/vinculacao.controller.js'
(finished - exit code 1) '/home/decko/node_modules/.bin/eslint -f unix --stdin --stdin-filename /home/decko/dev/epracas-frontend/src/js/praca/vinculacao.controller.js < /tmp/nvimsxUj7R/751/vinculacao.controller.js'
(finished - exit code 1) '/home/decko/node_modules/.bin/eslint -f unix --stdin --stdin-filename /home/decko/dev/epracas-frontend/src/js/praca/vinculacao.controller.js < /tmp/nvimsxUj7R/752/vinculacao.controller.js'
(finished - exit code 1) '/home/decko/node_modules/.bin/eslint -f unix --stdin --stdin-filename /home/decko/dev/epracas-frontend/src/js/praca/vinculacao.controller.js < /tmp/nvimsxUj7R/753/vinculacao.controller.js'
(finished - exit code 1) '/home/decko/node_modules/.bin/eslint -f unix --stdin --stdin-filename /home/decko/dev/epracas-frontend/src/js/praca/vinculacao.controller.js < /tmp/nvimsxUj7R/754/vinculacao.controller.js'
(started) '/home/decko/node_modules/.bin/eslint -f unix --stdin --stdin-filename /home/decko/dev/epracas-frontend/src/js/praca/vinculacao.controller.js < /tmp/nvimsxUj7R/755/vinculacao.controller.js'
(finished - exit code 1) '/home/decko/node_modules/.bin/eslint -f unix --stdin --stdin-filename /home/decko/dev/epracas-frontend/src/js/praca/vinculacao.controller.js < /tmp/nvimsxUj7R/756/vinculacao.controller.js'
(finished - exit code 1) '/home/decko/node_modules/.bin/eslint -f unix --stdin --stdin-filename /home/decko/dev/epracas-frontend/src/js/praca/vinculacao.controller.js < /tmp/nvimsxUj7R/757/vinculacao.controller.js'
(finished - exit code 1) '/home/decko/node_modules/.bin/eslint -f unix --stdin --stdin-filename /home/decko/dev/epracas-frontend/src/js/praca/vinculacao.controller.js < /tmp/nvimsxUj7R/758/vinculacao.controller.js'
(finished - exit code 1) '/home/decko/node_modules/.bin/eslint -f unix --stdin --stdin-filename /home/decko/dev/epracas-frontend/src/js/praca/vinculacao.controller.js < /tmp/nvimsxUj7R/759/vinculacao.controller.js'
(finished - exit code 1) '/home/decko/node_modules/.bin/eslint -f unix --stdin --stdin-filename /home/decko/dev/epracas-frontend/src/js/praca/vinculacao.controller.js < /tmp/nvimsxUj7R/761/vinculacao.controller.js'
(finished - exit code 1) '/home/decko/node_modules/.bin/eslint -f unix --stdin --stdin-filename /home/decko/dev/epracas-frontend/src/js/praca/vinculacao.controller.js < /tmp/nvimsxUj7R/774/vinculacao.controller.js'
If you pull master again for ALE and try again, you might start seeing some errors about problems with your eslint configuration file. I just implemented #386.
I am attempting to get ale running on my new laptop. Looks like from the output of
:ALEInfo
that ale is running but I am not able to get any indicators in vim. I have the following in my .vimrcAll of the commented out text is stuff that I've tried to get it working