mirror of
1
0
Fork 0
ultimate-vim/sources_non_forked/ale/autoload/ale/fixers/tslint.vim

23 lines
702 B
VimL
Raw Normal View History

" Author: carakan <carakan@gmail.com>
" Description: Fixing files with tslint.
function! ale#fixers#tslint#Fix(buffer) abort
2018-07-19 08:52:53 -04:00
let l:executable = ale#handlers#tslint#GetExecutable(a:buffer)
let l:tslint_config_path = ale#path#ResolveLocalPath(
\ a:buffer,
\ 'tslint.json',
\ ale#Var(a:buffer, 'typescript_tslint_config_path')
\)
let l:tslint_config_option = !empty(l:tslint_config_path)
\ ? ' -c ' . ale#Escape(l:tslint_config_path)
\ : ''
return {
\ 'command': ale#node#Executable(a:buffer, l:executable)
\ . l:tslint_config_option
2020-12-04 16:15:32 -05:00
\ . ' --outputAbsolutePaths --fix %t',
\ 'read_temporary_file': 1,
\}
endfunction