diff --git a/plugin/syntastic.vim b/plugin/syntastic.vim index af3d8804..16b1928b 100644 --- a/plugin/syntastic.vim +++ b/plugin/syntastic.vim @@ -19,7 +19,7 @@ if has('reltime') lockvar! g:_SYNTASTIC_START endif -let g:_SYNTASTIC_VERSION = '3.6.0-171' +let g:_SYNTASTIC_VERSION = '3.6.0-172' lockvar g:_SYNTASTIC_VERSION " Sanity checks {{{1 diff --git a/syntax_checkers/javascript/eslint.vim b/syntax_checkers/javascript/eslint.vim index cae1129f..29b978f7 100644 --- a/syntax_checkers/javascript/eslint.vim +++ b/syntax_checkers/javascript/eslint.vim @@ -18,6 +18,10 @@ if !exists('g:syntastic_javascript_eslint_sort') let g:syntastic_javascript_eslint_sort = 1 endif +if !exists('g:syntastic_javascript_eslint_generic') + let g:syntastic_javascript_eslint_generic = 0 +endif + let s:save_cpo = &cpo set cpo&vim @@ -25,14 +29,16 @@ function! SyntaxCheckers_javascript_eslint_IsAvailable() dict if !executable(self.getExec()) return 0 endif - return syntastic#util#versionIsAtLeast(self.getVersion(), [0, 1]) + return g:syntastic_javascript_eslint_generic || syntastic#util#versionIsAtLeast(self.getVersion(), [0, 1]) endfunction function! SyntaxCheckers_javascript_eslint_GetLocList() dict - call syntastic#log#deprecationWarn('javascript_eslint_conf', 'javascript_eslint_args', - \ "'--config ' . syntastic#util#shexpand(OLD_VAR)") + if !g:syntastic_javascript_eslint_generic + call syntastic#log#deprecationWarn('javascript_eslint_conf', 'javascript_eslint_args', + \ "'--config ' . syntastic#util#shexpand(OLD_VAR)") + endif - let makeprg = self.makeprgBuild({ 'args_before': '-f compact' }) + let makeprg = self.makeprgBuild({ 'args_before': (g:syntastic_javascript_eslint_generic ? '' : '-f compact') }) let errorformat = \ '%E%f: line %l\, col %c\, Error - %m,' . @@ -43,14 +49,16 @@ function! SyntaxCheckers_javascript_eslint_GetLocList() dict \ 'errorformat': errorformat, \ 'postprocess': ['guards'] }) - if !exists('s:eslint_new') - let s:eslint_new = syntastic#util#versionIsAtLeast(self.getVersion(), [1]) - endif + if !g:syntastic_javascript_eslint_generic + if !exists('s:eslint_new') + let s:eslint_new = syntastic#util#versionIsAtLeast(self.getVersion(), [1]) + endif - if !s:eslint_new - for e in loclist - let e['col'] += 1 - endfor + if !s:eslint_new + for e in loclist + let e['col'] += 1 + endfor + endif endif return loclist