mirror of
https://github.com/amix/vimrc
synced 2025-06-24 07:44:59 +08:00
Updated plugins
This commit is contained in:
@ -21,22 +21,31 @@ endif
|
||||
let s:save_cpo = &cpo
|
||||
set cpo&vim
|
||||
|
||||
function! SyntaxCheckers_javascript_eslint_IsAvailable() dict
|
||||
return
|
||||
\ executable('eslint') &&
|
||||
\ syntastic#util#versionIsAtLeast(syntastic#util#getVersion('eslint --version'), [0, 1])
|
||||
endfunction
|
||||
|
||||
function! SyntaxCheckers_javascript_eslint_GetLocList() dict
|
||||
let makeprg = self.makeprgBuild({
|
||||
\ 'args': (g:syntastic_javascript_eslint_conf != '' ? '--config ' . g:syntastic_javascript_eslint_conf : '') })
|
||||
\ 'args_before': '-f compact',
|
||||
\ 'args': (g:syntastic_javascript_eslint_conf != '' ?
|
||||
\ '--config ' . syntastic#util#shexpand(g:syntastic_javascript_eslint_conf) : '') })
|
||||
|
||||
let errorformat =
|
||||
\ '%E%f: line %l\, col %c\, Error - %m'
|
||||
|
||||
let loclist = SyntasticMake({
|
||||
\ 'makeprg': makeprg,
|
||||
\ 'errorformat': errorformat,
|
||||
\ 'postprocess': ['sort'] })
|
||||
\ 'errorformat': errorformat })
|
||||
|
||||
for e in loclist
|
||||
let e['col'] += 1
|
||||
endfor
|
||||
|
||||
call self.setWantSort(1)
|
||||
|
||||
return loclist
|
||||
endfunction
|
||||
|
||||
|
@ -19,14 +19,19 @@ set cpo&vim
|
||||
|
||||
function! SyntaxCheckers_javascript_jscs_GetLocList() dict
|
||||
let makeprg = self.makeprgBuild({ 'args_after': '--no-colors --reporter checkstyle' })
|
||||
|
||||
let errorformat = '%f:%t:%l:%c:%m'
|
||||
return SyntasticMake({
|
||||
|
||||
let loclist = SyntasticMake({
|
||||
\ 'makeprg': makeprg,
|
||||
\ 'errorformat': errorformat,
|
||||
\ 'subtype': 'Style',
|
||||
\ 'preprocess': 'checkstyle',
|
||||
\ 'postprocess': ['sort'],
|
||||
\ 'returns': [0, 2] })
|
||||
|
||||
call self.setWantSort(1)
|
||||
|
||||
return loclist
|
||||
endfunction
|
||||
|
||||
call g:SyntasticRegistry.CreateAndRegisterChecker({
|
||||
|
@ -25,19 +25,22 @@ function! SyntaxCheckers_javascript_jshint_IsAvailable() dict
|
||||
if !exists('g:syntastic_jshint_exec')
|
||||
let g:syntastic_jshint_exec = self.getExec()
|
||||
endif
|
||||
return executable(expand(g:syntastic_jshint_exec))
|
||||
if !executable(expand(g:syntastic_jshint_exec))
|
||||
return 0
|
||||
endif
|
||||
let s:jshint_version = syntastic#util#getVersion(syntastic#util#shexpand(g:syntastic_jshint_exec) . ' --version')
|
||||
return syntastic#util#versionIsAtLeast(s:jshint_version, [1])
|
||||
endfunction
|
||||
|
||||
function! SyntaxCheckers_javascript_jshint_GetLocList() dict
|
||||
let exe = syntastic#util#shexpand(g:syntastic_jshint_exec)
|
||||
if !exists('s:jshint_new')
|
||||
let s:jshint_new =
|
||||
\ syntastic#util#versionIsAtLeast(syntastic#util#getVersion(exe . ' --version'), [1, 1])
|
||||
let s:jshint_new = syntastic#util#versionIsAtLeast(s:jshint_version, [1, 1])
|
||||
endif
|
||||
|
||||
let makeprg = self.makeprgBuild({
|
||||
\ 'exe': exe,
|
||||
\ 'args': (g:syntastic_javascript_jshint_conf != '' ? '--config ' . g:syntastic_javascript_jshint_conf : ''),
|
||||
\ 'exe': syntastic#util#shexpand(g:syntastic_jshint_exec),
|
||||
\ 'args': (g:syntastic_javascript_jshint_conf != '' ?
|
||||
\ '--config ' . syntastic#util#shexpand(g:syntastic_javascript_jshint_conf) : ''),
|
||||
\ 'args_after': (s:jshint_new ? '--verbose ' : '') })
|
||||
|
||||
let errorformat = s:jshint_new ?
|
||||
|
@ -23,7 +23,8 @@ set cpo&vim
|
||||
|
||||
function! SyntaxCheckers_javascript_jsl_GetLocList() dict
|
||||
let makeprg = self.makeprgBuild({
|
||||
\ 'args': (g:syntastic_javascript_jsl_conf != '' ? '-conf ' . g:syntastic_javascript_jsl_conf : ''),
|
||||
\ 'args': (g:syntastic_javascript_jsl_conf != '' ?
|
||||
\ '-conf ' . syntastic#util#shexpand(g:syntastic_javascript_jsl_conf) : ''),
|
||||
\ 'args_after': '-nologo -nofilelisting -nosummary -nocontext -process' })
|
||||
|
||||
let errorformat =
|
||||
|
@ -18,10 +18,6 @@ let s:save_cpo = &cpo
|
||||
set cpo&vim
|
||||
|
||||
function! SyntaxCheckers_javascript_jsxhint_IsAvailable() dict
|
||||
if !executable('jshint') || !syntastic#util#versionIsAtLeast(syntastic#util#getVersion('jshint --version'), [1, 1])
|
||||
return 0
|
||||
endif
|
||||
|
||||
let jsxhint_version = system(self.getExecEscaped() . ' --version')
|
||||
return
|
||||
\ v:shell_error == 0 &&
|
||||
|
Reference in New Issue
Block a user