summaryrefslogtreecommitdiff
path: root/ale_linters/handlebars/embertemplatelint.vim
diff options
context:
space:
mode:
Diffstat (limited to 'ale_linters/handlebars/embertemplatelint.vim')
-rw-r--r--ale_linters/handlebars/embertemplatelint.vim10
1 files changed, 2 insertions, 8 deletions
diff --git a/ale_linters/handlebars/embertemplatelint.vim b/ale_linters/handlebars/embertemplatelint.vim
index e7fa149c..963ab568 100644
--- a/ale_linters/handlebars/embertemplatelint.vim
+++ b/ale_linters/handlebars/embertemplatelint.vim
@@ -16,16 +16,10 @@ function! ale_linters#handlebars#embertemplatelint#GetCommand(buffer) abort
endfunction
function! ale_linters#handlebars#embertemplatelint#Handle(buffer, lines) abort
- if len(a:lines) == 0
- return []
- endif
-
let l:output = []
+ let l:json = ale#util#FuzzyJSONDecode(a:lines, {})
- let l:input_json = json_decode(join(a:lines, ''))
- let l:file_errors = values(l:input_json)[0]
-
- for l:error in l:file_errors
+ for l:error in get(values(l:json), 0, [])
if has_key(l:error, 'fatal')
call add(l:output, {
\ 'bufnr': a:buffer,