Add tslint support for rules directory option
This commit is contained in:
parent
ee6dabcc4e
commit
cddb26558f
@ -3,6 +3,7 @@
|
|||||||
|
|
||||||
call ale#Set('typescript_tslint_executable', 'tslint')
|
call ale#Set('typescript_tslint_executable', 'tslint')
|
||||||
call ale#Set('typescript_tslint_config_path', '')
|
call ale#Set('typescript_tslint_config_path', '')
|
||||||
|
call ale#Set('typescript_tslint_rules_dir', '')
|
||||||
call ale#Set('typescript_tslint_use_global', 0)
|
call ale#Set('typescript_tslint_use_global', 0)
|
||||||
|
|
||||||
function! ale_linters#typescript#tslint#GetExecutable(buffer) abort
|
function! ale_linters#typescript#tslint#GetExecutable(buffer) abort
|
||||||
@ -45,6 +46,12 @@ function! ale_linters#typescript#tslint#BuildLintCommand(buffer) abort
|
|||||||
\ ? ' -c ' . ale#Escape(l:tslint_config_path)
|
\ ? ' -c ' . ale#Escape(l:tslint_config_path)
|
||||||
\ : ''
|
\ : ''
|
||||||
|
|
||||||
|
let l:tslint_rules_dir = ale#Var(a:buffer, 'typescript_tslint_rules_dir')
|
||||||
|
|
||||||
|
let l:tslint_rules_option = !empty(l:tslint_rules_dir)
|
||||||
|
\ ? ' -r ' . ale#Escape(l:tslint_rules_dir)
|
||||||
|
\ : ''
|
||||||
|
|
||||||
return ale_linters#typescript#tslint#GetExecutable(a:buffer)
|
return ale_linters#typescript#tslint#GetExecutable(a:buffer)
|
||||||
\ . ' --format json'
|
\ . ' --format json'
|
||||||
\ . l:tslint_config_option
|
\ . l:tslint_config_option
|
||||||
|
Loading…
Reference in New Issue
Block a user