summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlex Masterov <alex.masterow@gmail.com>2017-02-12 09:25:40 +0300
committerAlex Masterov <alex.masterow@gmail.com>2017-02-12 09:25:40 +0300
commit4e082b9217e95c442bc3fab1a7ea55a26ef8703e (patch)
treec4362ae374120734c43a6851d53f92c91ed78ed5
parent820896315ddef670e1e5283ee317025562fe2015 (diff)
downloadale-4e082b9217e95c442bc3fab1a7ea55a26ef8703e.zip
Add stylelint option to pass in more options
-rw-r--r--ale_linters/css/stylelint.vim4
-rw-r--r--doc/ale.txt6
2 files changed, 10 insertions, 0 deletions
diff --git a/ale_linters/css/stylelint.vim b/ale_linters/css/stylelint.vim
index e138d6d0..ef496302 100644
--- a/ale_linters/css/stylelint.vim
+++ b/ale_linters/css/stylelint.vim
@@ -3,6 +3,9 @@
let g:ale_css_stylelint_executable =
\ get(g:, 'ale_css_stylelint_executable', 'stylelint')
+let g:ale_css_stylelint_options =
+\ get(g:, 'ale_css_stylelint_options', '')
+
let g:ale_css_stylelint_use_global =
\ get(g:, 'ale_css_stylelint_use_global', 0)
@@ -20,6 +23,7 @@ endfunction
function! ale_linters#css#stylelint#GetCommand(buffer) abort
return ale_linters#css#stylelint#GetExecutable(a:buffer)
+ \ . ' ' . g:ale_css_stylelint_options
\ . ' --stdin-filename %s'
endfunction
diff --git a/doc/ale.txt b/doc/ale.txt
index 6e760717..e3eaacae 100644
--- a/doc/ale.txt
+++ b/doc/ale.txt
@@ -784,6 +784,12 @@ g:ale_css_stylelint_executable *g:ale_css_stylelint_executable*
If you wish to use only a globally installed version of stylelint, set
|g:ale_css_stylelint_use_global| to `1`.
+g:ale_css_stylelint_options *g:ale_css_stylelint_options*
+
+ Type: |String|
+ Default: `''`
+
+ This variable can be set to pass additional options to stylelint.
g:ale_css_stylelint_use_global *g:ale_css_stylelint_use_global*