mirror of
https://github.com/dense-analysis/ale.git
synced 2025-12-29 15:26:52 +08:00
Fix #2192 - Handle more ignore-pattern messages for ESLint
This commit is contained in:
@@ -342,6 +342,17 @@ Execute(eslint should warn about ignored files by default):
|
||||
\ '/path/to/some/ignored.js:0:0: File ignored because of a matching ignore pattern. Use "--no-ignore" to override. [Warning]',
|
||||
\ ])
|
||||
|
||||
AssertEqual
|
||||
\ [{
|
||||
\ 'lnum': 0,
|
||||
\ 'col': 0,
|
||||
\ 'type': 'W',
|
||||
\ 'text': 'File ignored by default. Use "--ignore-pattern ''!node_modules/*''" to override.',
|
||||
\ }],
|
||||
\ ale#handlers#eslint#Handle(bufnr(''), [
|
||||
\ '/path/to/some/ignored.js:0:0: File ignored by default. Use "--ignore-pattern ''!node_modules/*''" to override. [Warning]',
|
||||
\ ])
|
||||
|
||||
Execute(eslint should not warn about ignored files when explicitly disabled):
|
||||
let g:ale_javascript_eslint_suppress_eslintignore = 1
|
||||
|
||||
@@ -351,6 +362,12 @@ Execute(eslint should not warn about ignored files when explicitly disabled):
|
||||
\ '/path/to/some/ignored.js:0:0: File ignored because of a matching ignore pattern. Use "--no-ignore" to override. [Warning]',
|
||||
\ ])
|
||||
|
||||
AssertEqual
|
||||
\ [],
|
||||
\ ale#handlers#eslint#Handle(bufnr(''), [
|
||||
\ '/path/to/some/ignored.js:0:0: File ignored by default. Use "--ignore-pattern ''!node_modules/*''" to override. [Warning]',
|
||||
\ ])
|
||||
|
||||
Execute(eslint should handle react errors correctly):
|
||||
AssertEqual
|
||||
\ [
|
||||
|
||||
Reference in New Issue
Block a user