Ale function override of ale#handlers#eslint#FindConfig instead
This commit is contained in:
parent
9da5f059e1
commit
7c9e8ae1f6
13
vimrc
13
vimrc
|
@ -289,22 +289,13 @@ let g:ale_sign_error = '>>'
|
|||
let g:ale_sign_warning = '--'
|
||||
let g:ale_sign_column_always = 1
|
||||
|
||||
"let g:ale_linters = {'scss': ['stylelint'], 'javascript': ['jshint'], 'php':['php'], 'html':['htmlhint']}
|
||||
let g:ale_linters = {'scss': ['stylelint'], 'javascript': ['eslint'], 'php':['php'], 'html':['htmlhint']}
|
||||
let g:ale_html_htmlhint_options = '-c ~/.htmlhintrc --format=unix'
|
||||
let g:ale_javascript_eslint_options = '-c ~/.config/eslint/.eslintrc.js'
|
||||
let g:ale_fixers = {'javascript': ['eslint']}
|
||||
"let g:ale_javascript_prettier_options = '--single-quote '
|
||||
|
||||
" override ALE's eslint fix function to use correct config file
|
||||
function! ale#fixers#eslint#Fix(buffer) abort
|
||||
let l:executable = ale#handlers#eslint#GetExecutable(a:buffer)
|
||||
return {
|
||||
\ 'command': ale#node#Executable(a:buffer, l:executable)
|
||||
\ . ' --config /home/ray/.config/eslint/.eslintrc.js'
|
||||
\ . ' --fix %t',
|
||||
\ 'read_temporary_file': 1,
|
||||
\}
|
||||
function! ale#handlers#eslint#FindConfig(buffer)
|
||||
return '/home/ray/.config/eslint/.eslintrc.js'
|
||||
endfunction
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue