From 7c9e8ae1f6ebf7ad2f32174ea114f1ddd4476a45 Mon Sep 17 00:00:00 2001 From: ManjaroOne666 Date: Wed, 20 Sep 2017 10:16:38 +0100 Subject: [PATCH] Ale function override of ale#handlers#eslint#FindConfig instead --- vimrc | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-) diff --git a/vimrc b/vimrc index 0ec2b6b..66769b9 100644 --- a/vimrc +++ b/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