summaryrefslogtreecommitdiff
path: root/autoload
diff options
context:
space:
mode:
authorw0rp <devw0rp@gmail.com>2019-05-12 15:49:16 +0100
committerw0rp <devw0rp@gmail.com>2019-05-12 15:49:16 +0100
commit7943bfab96ea1ecc169e815f75062cc127192ed8 (patch)
treecd3b10df552c875a9aaba5017a2f4ebbb5596a98 /autoload
parent3303f596e504eec3b8b4202a7cfee4feff660699 (diff)
downloadale-7943bfab96ea1ecc169e815f75062cc127192ed8.zip
Make eslint respect the ale_warn_about_trailing_whitespace setting
Diffstat (limited to 'autoload')
-rw-r--r--autoload/ale/handlers/eslint.vim5
1 files changed, 5 insertions, 0 deletions
diff --git a/autoload/ale/handlers/eslint.vim b/autoload/ale/handlers/eslint.vim
index bc7c0321..5183f4cd 100644
--- a/autoload/ale/handlers/eslint.vim
+++ b/autoload/ale/handlers/eslint.vim
@@ -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)