summaryrefslogtreecommitdiff
path: root/ale_linters/javascript/flow.vim
diff options
context:
space:
mode:
authorw0rp <devw0rp@gmail.com>2018-04-15 12:25:15 +0100
committerw0rp <devw0rp@gmail.com>2018-04-15 12:25:15 +0100
commitfb720251bf38139c1811665852e1bc2f73d0393f (patch)
treec8dc084d5f6629ae3739379efdbabd9e2654166e /ale_linters/javascript/flow.vim
parent60917c900560e92b299ef3443f083334c0e8adcf (diff)
downloadale-fb720251bf38139c1811665852e1bc2f73d0393f.zip
Close #1504 - Add an option for removing --respect-pragma for flow
Diffstat (limited to 'ale_linters/javascript/flow.vim')
-rwxr-xr-xale_linters/javascript/flow.vim5
1 files changed, 3 insertions, 2 deletions
diff --git a/ale_linters/javascript/flow.vim b/ale_linters/javascript/flow.vim
index d2b362b5..d555184e 100755
--- a/ale_linters/javascript/flow.vim
+++ b/ale_linters/javascript/flow.vim
@@ -5,6 +5,7 @@
call ale#Set('javascript_flow_executable', 'flow')
call ale#Set('javascript_flow_use_home_config', 0)
call ale#Set('javascript_flow_use_global', get(g:, 'ale_use_global_executables', 0))
+call ale#Set('javascript_flow_use_respect_pragma', 1)
function! ale_linters#javascript#flow#GetExecutable(buffer) abort
let l:flow_config = ale#path#FindNearestFile(a:buffer, '.flowconfig')
@@ -47,8 +48,8 @@ function! ale_linters#javascript#flow#GetCommand(buffer, version_lines) abort
" If we can parse the version number, then only use --respect-pragma
" if the version is >= 0.36.0, which added the argument.
- let l:use_respect_pragma = empty(l:version)
- \ || ale#semver#GTE(l:version, [0, 36])
+ let l:use_respect_pragma = ale#Var(a:buffer, 'javascript_flow_use_respect_pragma')
+ \ && (empty(l:version) || ale#semver#GTE(l:version, [0, 36]))
return ale#Escape(l:executable)
\ . ' check-contents'