ale#fixers#eslint#Fix override tidied up

This commit is contained in:
ManjaroOne666 2017-09-20 00:09:18 +01:00
parent 246d699b56
commit 9da5f059e1
1 changed files with 1 additions and 7 deletions

8
vimrc
View File

@ -296,15 +296,9 @@ let g:ale_javascript_eslint_options = '-c ~/.config/eslint/.eslintrc.js'
let g:ale_fixers = {'javascript': ['eslint']} let g:ale_fixers = {'javascript': ['eslint']}
"let g:ale_javascript_prettier_options = '--single-quote ' "let g:ale_javascript_prettier_options = '--single-quote '
" override ALE's eslint fix function tose correct config file " override ALE's eslint fix function to use correct config file
function! ale#fixers#eslint#Fix(buffer) abort function! ale#fixers#eslint#Fix(buffer) abort
let l:executable = ale#handlers#eslint#GetExecutable(a:buffer) let l:executable = ale#handlers#eslint#GetExecutable(a:buffer)
let l:config = ale#handlers#eslint#FindConfig(a:buffer)
if empty(l:config)
let l:config = ''
endif
return { return {
\ 'command': ale#node#Executable(a:buffer, l:executable) \ 'command': ale#node#Executable(a:buffer, l:executable)
\ . ' --config /home/ray/.config/eslint/.eslintrc.js' \ . ' --config /home/ray/.config/eslint/.eslintrc.js'