From fa33faad9ed6da220394bd2abec2e1bdcd19edba Mon Sep 17 00:00:00 2001 From: w0rp Date: Thu, 27 Jul 2017 00:45:25 +0100 Subject: #810 - Handle output which is not JSON in many linters --- ale_linters/typescript/tslint.vim | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) (limited to 'ale_linters/typescript/tslint.vim') diff --git a/ale_linters/typescript/tslint.vim b/ale_linters/typescript/tslint.vim index e9b31644..7cd1cb4b 100644 --- a/ale_linters/typescript/tslint.vim +++ b/ale_linters/typescript/tslint.vim @@ -14,11 +14,7 @@ endfunction function! ale_linters#typescript#tslint#Handle(buffer, lines) abort let l:output = [] - if empty(a:lines) - return [] - endif - - for l:error in json_decode(join(a:lines, '')) + for l:error in ale#util#FuzzyJSONDecode(a:lines, []) if ale#path#IsBufferPath(a:buffer, l:error.name) call add(l:output, { \ 'type': (get(l:error, 'ruleSeverity', '') ==# 'WARNING' ? 'W' : 'E'), -- cgit v1.2.3