mirror of https://github.com/dense-analysis/ale
Fix stylelint not obeying project-specific rules (#3272)
* Fix stylelint not obeying project-specific rules * Fix tests * Fix test * Fix test
This commit is contained in:
parent
1c90d8c018
commit
737c1bf1ac
|
@ -19,9 +19,8 @@ function! ale#fixers#stylelint#Fix(buffer) abort
|
||||||
return {
|
return {
|
||||||
\ 'cwd': '%s:h',
|
\ 'cwd': '%s:h',
|
||||||
\ 'command': ale#node#Executable(a:buffer, l:executable)
|
\ 'command': ale#node#Executable(a:buffer, l:executable)
|
||||||
\ . ' %t'
|
|
||||||
\ . ale#Pad(l:options)
|
\ . ale#Pad(l:options)
|
||||||
\ . ' --fix',
|
\ . ' --fix --stdin --stdin-filename %s',
|
||||||
\ 'read_temporary_file': 1,
|
\ 'read_temporary_file': 0,
|
||||||
\}
|
\}
|
||||||
endfunction
|
endfunction
|
||||||
|
|
|
@ -13,12 +13,11 @@ Execute(The stylelint callback should return the correct default values):
|
||||||
|
|
||||||
AssertFixer
|
AssertFixer
|
||||||
\ {
|
\ {
|
||||||
\ 'read_temporary_file': 1,
|
\ 'read_temporary_file': 0,
|
||||||
\ 'cwd': '%s:h',
|
\ 'cwd': '%s:h',
|
||||||
\ 'command': (has('win32') ? 'node.exe ' : '')
|
\ 'command': (has('win32') ? 'node.exe ' : '')
|
||||||
\ . ale#Escape(ale#path#Simplify(g:dir . '/../test-files/eslint/react-app/node_modules/stylelint/bin/stylelint.js'))
|
\ . ale#Escape(ale#path#Simplify(g:dir . '/../test-files/eslint/react-app/node_modules/stylelint/bin/stylelint.js'))
|
||||||
\ . ' %t'
|
\ . ' --fix --stdin --stdin-filename %s',
|
||||||
\ . ' --fix',
|
|
||||||
\ }
|
\ }
|
||||||
|
|
||||||
Execute(The stylelint callback should include custom stylelint options):
|
Execute(The stylelint callback should include custom stylelint options):
|
||||||
|
@ -27,11 +26,9 @@ Execute(The stylelint callback should include custom stylelint options):
|
||||||
|
|
||||||
AssertFixer
|
AssertFixer
|
||||||
\ {
|
\ {
|
||||||
\ 'read_temporary_file': 1,
|
\ 'read_temporary_file': 0,
|
||||||
\ 'cwd': '%s:h',
|
\ 'cwd': '%s:h',
|
||||||
\ 'command': (has('win32') ? 'node.exe ' : '')
|
\ 'command': (has('win32') ? 'node.exe ' : '')
|
||||||
\ . ale#Escape(ale#path#Simplify(g:dir . '/../test-files/eslint/react-app/node_modules/stylelint/bin/stylelint.js'))
|
\ . ale#Escape(ale#path#Simplify(g:dir . '/../test-files/eslint/react-app/node_modules/stylelint/bin/stylelint.js'))
|
||||||
\ . ' %t'
|
\ . ' --cache --fix --stdin --stdin-filename %s',
|
||||||
\ . ' --cache'
|
|
||||||
\ . ' --fix',
|
|
||||||
\ }
|
\ }
|
||||||
|
|
Loading…
Reference in New Issue