From 2c176a234ed139b8e2b0b57ccb4a586de0dcf595 Mon Sep 17 00:00:00 2001 From: Zefei Xuan Date: Thu, 5 Jan 2017 00:12:36 -0800 Subject: added eslint option to pass in more options --- ale_linters/javascript/eslint.vim | 4 ++++ doc/ale.txt | 8 ++++++++ 2 files changed, 12 insertions(+) diff --git a/ale_linters/javascript/eslint.vim b/ale_linters/javascript/eslint.vim index 94086b0a..95948fbd 100644 --- a/ale_linters/javascript/eslint.vim +++ b/ale_linters/javascript/eslint.vim @@ -4,6 +4,9 @@ let g:ale_javascript_eslint_executable = \ get(g:, 'ale_javascript_eslint_executable', 'eslint') +let g:ale_javascript_eslint_options = +\ get(g:, 'ale_javascript_eslint_options', '') + let g:ale_javascript_eslint_use_global = \ get(g:, 'ale_javascript_eslint_use_global', 0) @@ -21,6 +24,7 @@ endfunction function! ale_linters#javascript#eslint#GetCommand(buffer) abort return ale_linters#javascript#eslint#GetExecutable(a:buffer) + \ . ' ' . g:ale_javascript_eslint_options \ . ' -f unix --stdin --stdin-filename %s' endfunction diff --git a/doc/ale.txt b/doc/ale.txt index 8144267e..2ddb3d37 100644 --- a/doc/ale.txt +++ b/doc/ale.txt @@ -383,6 +383,14 @@ g:ale_javascript_eslint_executable *g:ale_javascript_eslint_executable* |g:ale_javascript_eslint_use_global| to `1`. +g:ale_javascript_eslint_options *g:ale_javascript_eslint_options* + + Type: |String| + Default: `''` + + This variable can be set to pass additional options to eslint. + + g:ale_javascript_eslint_use_global *g:ale_javascript_eslint_use_global* Type: |String| -- cgit v1.2.3