diff options
author | Eric Stern <github@ericstern.com> | 2017-08-22 13:35:09 -0700 |
---|---|---|
committer | w0rp <w0rp@users.noreply.github.com> | 2017-08-22 21:35:09 +0100 |
commit | 2f19cf874b33f55312d1a5814eab16f8eec7432e (patch) | |
tree | f82c742bd303bd6ebbc73d5eaa8fe7ee90d3c975 /autoload | |
parent | 1a524ca63e51092ab10febea40a6f018b6e85173 (diff) | |
download | ale-2f19cf874b33f55312d1a5814eab16f8eec7432e.zip |
Suppress warning about .eslintignore'd file (#836)
* Suppress warning about .eslintignore'd file
* Fix slightly ironic lint error
* Lock error suppression behind a variable; add docs and tests
Diffstat (limited to 'autoload')
-rw-r--r-- | autoload/ale/handlers/eslint.vim | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/autoload/ale/handlers/eslint.vim b/autoload/ale/handlers/eslint.vim index a5210ae0..6c5d75c0 100644 --- a/autoload/ale/handlers/eslint.vim +++ b/autoload/ale/handlers/eslint.vim @@ -4,6 +4,7 @@ call ale#Set('javascript_eslint_options', '') call ale#Set('javascript_eslint_executable', 'eslint') call ale#Set('javascript_eslint_use_global', 0) +call ale#Set('javascript_eslint_suppress_eslintignore', 0) function! ale#handlers#eslint#GetExecutable(buffer) abort return ale#node#FindExecutable(a:buffer, 'javascript_eslint', [ @@ -82,6 +83,12 @@ function! ale#handlers#eslint#Handle(buffer, lines) abort let l:type = 'Error' let l:text = l:match[3] + if ale#Var(a:buffer, 'javascript_eslint_suppress_eslintignore') + if l:text is# 'File ignored because of a matching ignore pattern. Use "--no-ignore" to override.' + continue + endif + endif + " Take the error type from the output if available. if !empty(l:match[4]) let l:type = split(l:match[4], '/')[0] |