Make eslint respect the ale_warn_about_trailing_whitespace setting

This commit is contained in:
w0rp
2019-05-12 15:49:16 +01:00
parent 3303f596e5
commit 7943bfab96
2 changed files with 47 additions and 0 deletions

View File

@@ -143,6 +143,11 @@ function! ale#handlers#eslint#Handle(buffer, lines) abort
" The code can be something like 'Error/foo/bar', or just 'Error'
if !empty(get(l:split_code, 1))
let l:obj.code = join(l:split_code[1:], '/')
if l:obj.code is# 'no-trailing-spaces'
\&& !ale#Var(a:buffer, 'warn_about_trailing_whitespace')
continue
endif
endif
for l:col_match in ale#util#GetMatches(l:text, s:col_end_patterns)