diff --git a/ale_linters/typescript/tslint.vim b/ale_linters/typescript/tslint.vim index e9b3164..a637697 100644 --- a/ale_linters/typescript/tslint.vim +++ b/ale_linters/typescript/tslint.vim @@ -3,6 +3,7 @@ call ale#Set('typescript_tslint_executable', 'tslint') call ale#Set('typescript_tslint_config_path', '') +call ale#Set('typescript_tslint_rules_dir', '') call ale#Set('typescript_tslint_use_global', 0) function! ale_linters#typescript#tslint#GetExecutable(buffer) abort @@ -44,6 +45,12 @@ function! ale_linters#typescript#tslint#BuildLintCommand(buffer) abort let l:tslint_config_option = !empty(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) \ . ' --format json'