summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorw0rp <devw0rp@gmail.com>2017-11-13 23:21:45 +0000
committerw0rp <devw0rp@gmail.com>2017-11-13 23:23:06 +0000
commit8a3a2da87ed446a7161538e08ce1e961f3dc393c (patch)
tree946ef494cd249204c2dad8a17c159ed532e6756b /test
parent764a33b1c9dc355f779366762db1645eda478ee4 (diff)
downloadale-8a3a2da87ed446a7161538e08ce1e961f3dc393c.zip
#852 Capture error codes for ESLint
Diffstat (limited to 'test')
-rw-r--r--test/handler/test_eslint_handler.vader27
1 files changed, 17 insertions, 10 deletions
diff --git a/test/handler/test_eslint_handler.vader b/test/handler/test_eslint_handler.vader
index 0ebeb383..47e84d4f 100644
--- a/test/handler/test_eslint_handler.vader
+++ b/test/handler/test_eslint_handler.vader
@@ -19,13 +19,15 @@ Execute(The eslint handler should parse lines correctly):
\ {
\ 'lnum': 47,
\ 'col': 14,
- \ 'text': 'Missing trailing comma. [Warning/comma-dangle]',
+ \ 'text': 'Missing trailing comma.',
+ \ 'code': 'comma-dangle',
\ 'type': 'W',
\ },
\ {
\ 'lnum': 56,
\ 'col': 41,
- \ 'text': 'Missing semicolon. [Error/semi]',
+ \ 'text': 'Missing semicolon.',
+ \ 'code': 'semi',
\ 'type': 'E',
\ },
\ {
@@ -259,42 +261,47 @@ Execute(The eslint handler should output end_col values where appropriate):
\ 'lnum': 4,
\ 'col': 3,
\ 'end_col': 15,
- \ 'text': 'Parsing error: Unexpected token ''some string'' [Error]',
+ \ 'text': 'Parsing error: Unexpected token ''some string''',
\ 'type': 'E',
\ },
\ {
\ 'lnum': 70,
\ 'col': 3,
\ 'end_col': 5,
- \ 'text': '''foo'' is not defined. [Error/no-undef]',
+ \ 'text': '''foo'' is not defined.',
+ \ 'code': 'no-undef',
\ 'type': 'E',
\ },
\ {
\ 'lnum': 71,
\ 'col': 2,
\ 'end_col': 6,
- \ 'text': 'Unexpected `await` inside a loop. [Error/no-await-in-loop]',
+ \ 'text': 'Unexpected `await` inside a loop.',
+ \ 'code': 'no-await-in-loop',
\ 'type': 'E',
\ },
\ {
\ 'lnum': 72,
\ 'col': 6,
\ 'end_col': 10,
- \ 'text': 'Redundant use of `await` on a return value. [Error/no-return-await]',
+ \ 'text': 'Redundant use of `await` on a return value.',
+ \ 'code': 'no-return-await',
\ 'type': 'E',
\ },
\ {
\ 'lnum': 73,
\ 'col': 4,
\ 'end_col': 10,
- \ 'text': 'Unexpected console statement [Error/no-console]',
+ \ 'text': 'Unexpected console statement',
+ \ 'code': 'no-console',
\ 'type': 'E',
\ },
\ {
\ 'lnum': 74,
\ 'col': 4,
\ 'end_col': 11,
- \ 'text': 'Unexpected ''debugger'' statement. [Error/no-debugger]',
+ \ 'text': 'Unexpected ''debugger'' statement.',
+ \ 'code': 'no-debugger',
\ 'type': 'E',
\ },
\ ],
@@ -316,7 +323,7 @@ Execute(The eslint hint about using typescript-eslint-parser):
\ 'lnum': 451,
\ 'col': 2,
\ 'end_col': 2,
- \ 'text': 'Parsing error (You may need configure typescript-eslint-parser): Unexpected token ) [Error]',
+ \ 'text': 'Parsing error (You may need configure typescript-eslint-parser): Unexpected token )',
\ 'type': 'E',
\ },
\ ],
@@ -330,7 +337,7 @@ Execute(eslint should warn about ignored files by default):
\ 'lnum': 0,
\ 'col': 0,
\ 'type': 'W',
- \ 'text': 'File ignored because of a matching ignore pattern. Use "--no-ignore" to override. [Warning]'
+ \ 'text': 'File ignored because of a matching ignore pattern. Use "--no-ignore" to override.'
\ }],
\ ale#handlers#eslint#Handle(bufnr(''), [
\ '/path/to/some/ignored.js:0:0: File ignored because of a matching ignore pattern. Use "--no-ignore" to override. [Warning]',