mirror of
https://github.com/dense-analysis/ale.git
synced 2025-12-06 12:44:23 +08:00
Adding --no-color flag to stylelint args (#5050)
* Adding --no-color flag to sass stylelint * Adding --no-color to all stylelint args * Adding --no-color expectation to stylelint tests * Properly handling SyntaxError for stylelint; adding corresponding test * Fixing CSS stylelint parameters and adding regression test
This commit is contained in:
@@ -41,3 +41,26 @@ Execute (stylelint should complain when no configuration file is used):
|
||||
\ 'detail': join(g:error_lines, "\n"),
|
||||
\ }],
|
||||
\ ale#handlers#css#HandleStyleLintFormat(347, g:error_lines[:])
|
||||
|
||||
Execute (stylelint should complain but not blow up when SyntaxError is encountered):
|
||||
let g:error_lines = [
|
||||
\ 'SyntaxError: Unexpected token, expected "," (136:4)',
|
||||
\ ' at constructor (/home/ts-project/node_modules/@babel/parser/lib/index.js:367:19)',
|
||||
\ ' at TypeScriptParserMixin.raise (/home/ts-project/node_modules/@babel/parser/lib/index.js:6630:19)',
|
||||
\ ' at TypeScriptParserMixin.unexpected (/home/ts-project/node_modules/@babel/parser/lib/index.js:6650:16)',
|
||||
\ ' at TypeScriptParserMixin.expect (/home/ts-project/node_modules/@babel/parser/lib/index.js:6930:12)',
|
||||
\ ' at TypeScriptParserMixin.tsParseDelimitedListWorker (/home/ts-project/node_modules/@babel/parser/lib/index.js:7932:14)',
|
||||
\ ' at TypeScriptParserMixin.tsParseDelimitedList (/home/ts-project/node_modules/@babel/parser/lib/index.js:7909:25)',
|
||||
\ ' at /home/ts-project/node_modules/@babel/parser/lib/index.js:9170:19',
|
||||
\ ' at TypeScriptParserMixin.tsInTopLevelContext (/home/ts-project/node_modules/@babel/parser/lib/index.js:8834:14)',
|
||||
\ ' at /home/ts-project/node_modules/@babel/parser/lib/index.js:9168:44',
|
||||
\ ' at TypeScriptParserMixin.tsInType (/home/ts-project/node_modules/@babel/parser/lib/index.js:8841:14)',
|
||||
\]
|
||||
|
||||
AssertEqual
|
||||
\ [{
|
||||
\ 'lnum': 1,
|
||||
\ 'text': 'stylelint exception thrown (type :ALEDetail for more information)',
|
||||
\ 'detail': join(g:error_lines, "\n"),
|
||||
\ }],
|
||||
\ ale#handlers#css#HandleStyleLintFormat(347, g:error_lines[:])
|
||||
|
||||
Reference in New Issue
Block a user