summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorw0rp <w0rp@users.noreply.github.com>2017-01-12 09:28:06 +0000
committerGitHub <noreply@github.com>2017-01-12 09:28:06 +0000
commit75485d53f67ab665fb7a4e13803d87c71b7368ae (patch)
tree391b8f2594c64dcda06fd06950cc8999b3ece23e
parent5a0c3fd01e79feb1b35e554c38045ae0a88c429f (diff)
parent2c176a234ed139b8e2b0b57ccb4a586de0dcf595 (diff)
downloadale-75485d53f67ab665fb7a4e13803d87c71b7368ae.zip
Merge pull request #245 from zefei/add-eslint-options
Add eslint option to pass in more options
-rw-r--r--ale_linters/javascript/eslint.vim4
-rw-r--r--doc/ale.txt8
2 files changed, 12 insertions, 0 deletions
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 6d43ec65..7fa9dac5 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|