summaryrefslogtreecommitdiff
path: root/ale_linters/typescript
diff options
context:
space:
mode:
authorJonathan Clem <jonathan@jclem.net>2017-07-21 15:52:51 -0400
committerGitHub <noreply@github.com>2017-07-21 15:52:51 -0400
commitcddb26558f1c8553a07f855bffdc7cbdc1230f7f (patch)
tree9bf917a208bd9ef041ff975ff25488975969f1c7 /ale_linters/typescript
parentee6dabcc4e2f64c7a035a2e7da3bc13285013d88 (diff)
downloadale-cddb26558f1c8553a07f855bffdc7cbdc1230f7f.zip
Add tslint support for rules directory option
Diffstat (limited to 'ale_linters/typescript')
-rw-r--r--ale_linters/typescript/tslint.vim7
1 files changed, 7 insertions, 0 deletions
diff --git a/ale_linters/typescript/tslint.vim b/ale_linters/typescript/tslint.vim
index e9b31644..a6376974 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'