Skip to content
master
Go to file
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
 
 
doc
 
 
 
 
 
 
 
 
 
 
 
 

README.md

vim-tslint

Build Status

An asynchronous Tslint for Vim.

Realtime style check

Invoke manually

Open TypeScript file and just execute :Tslint.

Automatically lint on save

autocmd BufWritePost *.ts,*.tsx call tslint#run('a', win_getid())

Autofix

Execute :TslintFix and automatically fix.

Integrate with Tsuquyomi

You can use Tsuquyomi's TsuGeterr and Tslint. Set followings to your vimrc.

augroup tslint
  function! s:typescript_after(ch, msg)
    let cnt = len(getqflist())
    if cnt > 0
      echomsg printf('[Tslint] %s errors', cnt)
    endif
  endfunction
  let g:tslint_callbacks = {
    \ 'after_run': function('s:typescript_after')
    \ }

  let g:tsuquyomi_disable_quickfix = 1

  function! s:ts_quickfix()
    let winid = win_getid()
    execute ':TsuquyomiGeterr'
    call tslint#run('a', winid)
  endfunction

  autocmd BufWritePost *.ts,*.tsx silent! call s:ts_quickfix()
  autocmd InsertLeave *.ts,*.tsx silent! call s:ts_quickfix()
augroup END

License

New BSD License

About

Vim plugin for tslint

Topics

Resources

License

Releases

No releases published

Packages

No packages published
You can’t perform that action at this time.