Files
ale/test/fixers/test_stylelint_fixer_callback.vader
Steve Matney de2d3da738 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
2025-11-22 21:00:41 +09:00

35 lines
1.1 KiB
Plaintext

Before:
Save g:ale_stylelint_options
let g:ale_stylelint_options = ''
call ale#assert#SetUpFixerTest('css', 'stylelint')
After:
call ale#assert#TearDownFixerTest()
Execute(The stylelint callback should return the correct default values):
call ale#test#SetFilename('../test-files/eslint/react-app/subdir/testfile.css')
AssertFixer
\ {
\ 'read_temporary_file': 0,
\ 'cwd': '%s:h',
\ 'command': (has('win32') ? 'node.exe ' : '')
\ . ale#Escape(ale#path#Simplify(g:dir . '/../test-files/eslint/react-app/node_modules/stylelint/bin/stylelint.js'))
\ . ' --fix --stdin --no-color --stdin-filename %s',
\ }
Execute(The stylelint callback should include custom stylelint options):
let g:ale_stylelint_options = '--cache'
call ale#test#SetFilename('../test-files/eslint/react-app/subdir/testfile.css')
AssertFixer
\ {
\ 'read_temporary_file': 0,
\ 'cwd': '%s:h',
\ 'command': (has('win32') ? 'node.exe ' : '')
\ . ale#Escape(ale#path#Simplify(g:dir . '/../test-files/eslint/react-app/node_modules/stylelint/bin/stylelint.js'))
\ . ' --cache --fix --stdin --no-color --stdin-filename %s',
\ }