Use correct handler for 'xo' linter

This commit is contained in:
Nils Kuhnhenn 2019-06-04 13:14:08 +02:00
parent 79d1b99067
commit 7d4a83ecd4
2 changed files with 3 additions and 3 deletions

View File

@ -14,7 +14,7 @@ endfunction
function! ale_linters#javascript#xo#GetCommand(buffer) abort function! ale_linters#javascript#xo#GetCommand(buffer) abort
return ale#Escape(ale_linters#javascript#xo#GetExecutable(a:buffer)) return ale#Escape(ale_linters#javascript#xo#GetExecutable(a:buffer))
\ . ' ' . ale#Var(a:buffer, 'javascript_xo_options') \ . ' ' . ale#Var(a:buffer, 'javascript_xo_options')
\ . ' --reporter unix --stdin --stdin-filename %s' \ . ' --reporter json --stdin --stdin-filename %s'
endfunction endfunction
" xo uses eslint and the output format is the same " xo uses eslint and the output format is the same
@ -22,5 +22,5 @@ call ale#linter#Define('javascript', {
\ 'name': 'xo', \ 'name': 'xo',
\ 'executable': function('ale_linters#javascript#xo#GetExecutable'), \ 'executable': function('ale_linters#javascript#xo#GetExecutable'),
\ 'command': function('ale_linters#javascript#xo#GetCommand'), \ 'command': function('ale_linters#javascript#xo#GetCommand'),
\ 'callback': 'ale#handlers#eslint#Handle', \ 'callback': 'ale#handlers#eslint#HandleJSON',
\}) \})

View File

@ -19,5 +19,5 @@ call ale#linter#Define('typescript', {
\ 'name': 'xo', \ 'name': 'xo',
\ 'executable': function('ale_linters#typescript#xo#GetExecutable'), \ 'executable': function('ale_linters#typescript#xo#GetExecutable'),
\ 'command': function('ale_linters#typescript#xo#GetCommand'), \ 'command': function('ale_linters#typescript#xo#GetCommand'),
\ 'callback': 'ale#handlers#eslint#Handle', \ 'callback': 'ale#handlers#eslint#HandleJSON',
\}) \})