Use JSON output for eslint and fix tsserver column

This commit is contained in:
Nils Kuhnhenn
2019-06-02 09:35:31 +02:00
parent 135de34d22
commit 79d1b99067
10 changed files with 486 additions and 45 deletions

View File

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

View File

@@ -11,7 +11,7 @@ endfunction
function! ale_linters#typescript#xo#GetCommand(buffer) abort
return ale#Escape(ale_linters#typescript#xo#GetExecutable(a:buffer))
\ . ale#Pad(ale#Var(a:buffer, 'typescript_xo_options'))
\ . ' --reporter unix --stdin --stdin-filename %s'
\ . ' --reporter json --stdin --stdin-filename %s'
endfunction
" xo uses eslint and the output format is the same