summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--autoload/ale/fixers/stylelint.vim5
-rw-r--r--test/fixers/test_stylelint_fixer_callback.vader11
2 files changed, 6 insertions, 10 deletions
diff --git a/autoload/ale/fixers/stylelint.vim b/autoload/ale/fixers/stylelint.vim
index 0caab802..da067198 100644
--- a/autoload/ale/fixers/stylelint.vim
+++ b/autoload/ale/fixers/stylelint.vim
@@ -19,9 +19,8 @@ function! ale#fixers#stylelint#Fix(buffer) abort
return {
\ 'cwd': '%s:h',
\ 'command': ale#node#Executable(a:buffer, l:executable)
- \ . ' %t'
\ . ale#Pad(l:options)
- \ . ' --fix',
- \ 'read_temporary_file': 1,
+ \ . ' --fix --stdin --stdin-filename %s',
+ \ 'read_temporary_file': 0,
\}
endfunction
diff --git a/test/fixers/test_stylelint_fixer_callback.vader b/test/fixers/test_stylelint_fixer_callback.vader
index 3c843975..ee7cfdd4 100644
--- a/test/fixers/test_stylelint_fixer_callback.vader
+++ b/test/fixers/test_stylelint_fixer_callback.vader
@@ -13,12 +13,11 @@ Execute(The stylelint callback should return the correct default values):
AssertFixer
\ {
- \ 'read_temporary_file': 1,
+ \ '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'))
- \ . ' %t'
- \ . ' --fix',
+ \ . ' --fix --stdin --stdin-filename %s',
\ }
Execute(The stylelint callback should include custom stylelint options):
@@ -27,11 +26,9 @@ Execute(The stylelint callback should include custom stylelint options):
AssertFixer
\ {
- \ 'read_temporary_file': 1,
+ \ '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'))
- \ . ' %t'
- \ . ' --cache'
- \ . ' --fix',
+ \ . ' --cache --fix --stdin --stdin-filename %s',
\ }