Add missing "use global" var for tslint (#484)

* Add missing "use global" var for tslint
* Add typescript tslint documentation
This commit is contained in:
Shane Smith
2017-04-18 04:28:54 -04:00
committed by w0rp
parent bdad25eefd
commit 72449d7cb1
3 changed files with 49 additions and 0 deletions

View File

@@ -7,7 +7,14 @@ let g:ale_typescript_tslint_executable =
let g:ale_typescript_tslint_config_path =
\ get(g:, 'ale_typescript_tslint_config_path', '')
let g:ale_typescript_tslint_use_global =
\ get(g:, 'ale_typescript_tslint_use_global', 0)
function! ale_linters#typescript#tslint#GetExecutable(buffer) abort
if ale#Var(a:buffer, 'typescript_tslint_use_global')
return ale#Var(a:buffer, 'typescript_tslint_executable')
endif
return ale#path#ResolveLocalPath(
\ a:buffer,
\ 'node_modules/.bin/tslint',