Merge pull request #2920 from ConradIrwin/prettier-standard-stdin

Fix prettier_standard to respect the configuration file
This commit is contained in:
w0rp 2020-08-14 00:27:41 +01:00 committed by GitHub
commit 8151e3e8fa
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 21 additions and 2 deletions

View File

@ -17,8 +17,8 @@ function! ale#fixers#prettier_standard#Fix(buffer) abort
return {
\ 'command': ale#Escape(ale#fixers#prettier_standard#GetExecutable(a:buffer))
\ . ' %t'
\ . ' --stdin'
\ . ' --stdin-filepath=%s'
\ . ' ' . l:options,
\ 'read_temporary_file': 1,
\}
endfunction

View File

@ -0,0 +1,19 @@
Before:
call ale#assert#SetUpFixerTest('javascript', 'prettier_standard')
silent cd ..
silent cd command_callback
let g:dir = getcwd()
After:
call ale#assert#TearDownFixerTest()
Execute(The prettier callback should return the correct default values):
call ale#test#SetFilename('../prettier-test-files/testfile.js')
AssertFixer
\ {
\ 'command': ale#Escape(g:ale_javascript_prettier_standard_executable)
\ . ' --stdin'
\ . ' --stdin-filepath=%s ',
\ }