Escape JavaScript executables in commands
This commit is contained in:
parent
4228c503f4
commit
05bd4f591c
@ -34,7 +34,7 @@ function! ale_linters#javascript#eslint#GetExecutable(buffer) abort
|
||||
endfunction
|
||||
|
||||
function! ale_linters#javascript#eslint#GetCommand(buffer) abort
|
||||
return ale_linters#javascript#eslint#GetExecutable(a:buffer)
|
||||
return fnameescape(ale_linters#javascript#eslint#GetExecutable(a:buffer))
|
||||
\ . ' ' . ale#Var(a:buffer, 'javascript_eslint_options')
|
||||
\ . ' -f unix --stdin --stdin-filename %s'
|
||||
endfunction
|
||||
|
@ -27,7 +27,7 @@ function! ale_linters#javascript#flow#GetCommand(buffer) abort
|
||||
return ''
|
||||
endif
|
||||
|
||||
return ale_linters#javascript#flow#GetExecutable(a:buffer)
|
||||
return fnameescape(ale_linters#javascript#flow#GetExecutable(a:buffer))
|
||||
\ . ' check-contents --respect-pragma --json --from ale %s'
|
||||
endfunction
|
||||
|
||||
|
@ -27,7 +27,7 @@ function! ale_linters#javascript#jshint#GetCommand(buffer) abort
|
||||
\ get(g:, 'ale_jshint_config_loc', '')
|
||||
\)
|
||||
|
||||
let l:command = ale_linters#javascript#jshint#GetExecutable(a:buffer)
|
||||
let l:command = fnameescape(ale_linters#javascript#jshint#GetExecutable(a:buffer))
|
||||
let l:command .= ' --reporter unix --extract auto'
|
||||
|
||||
if !empty(l:jshint_config)
|
||||
|
@ -23,7 +23,7 @@ function! ale_linters#javascript#standard#GetExecutable(buffer) abort
|
||||
endfunction
|
||||
|
||||
function! ale_linters#javascript#standard#GetCommand(buffer) abort
|
||||
return ale_linters#javascript#standard#GetExecutable(a:buffer)
|
||||
return fnameescape(ale_linters#javascript#standard#GetExecutable(a:buffer))
|
||||
\ . ' ' . ale#Var(a:buffer, 'javascript_standard_options')
|
||||
\ . ' --stdin %s'
|
||||
endfunction
|
||||
|
@ -23,7 +23,7 @@ function! ale_linters#javascript#xo#GetExecutable(buffer) abort
|
||||
endfunction
|
||||
|
||||
function! ale_linters#javascript#xo#GetCommand(buffer) abort
|
||||
return ale_linters#javascript#xo#GetExecutable(a:buffer)
|
||||
return fnameescape(ale_linters#javascript#xo#GetExecutable(a:buffer))
|
||||
\ . ' ' . ale#Var(a:buffer, 'javascript_xo_options')
|
||||
\ . ' --reporter unix --stdin --stdin-filename %s'
|
||||
endfunction
|
||||
|
Loading…
Reference in New Issue
Block a user