https://github.com/heavenshell/vim-tslint
Vim plugin for tslint
https://github.com/heavenshell/vim-tslint
tslint vim vim-scripts
Last synced: 9 months ago
JSON representation
Vim plugin for tslint
- Host: GitHub
- URL: https://github.com/heavenshell/vim-tslint
- Owner: heavenshell
- License: bsd-3-clause
- Created: 2018-01-02T16:09:42.000Z (about 8 years ago)
- Default Branch: master
- Last Pushed: 2020-11-05T13:56:25.000Z (about 5 years ago)
- Last Synced: 2023-03-10T20:08:08.046Z (almost 3 years ago)
- Topics: tslint, vim, vim-scripts
- Language: Vim script
- Size: 9.15 MB
- Stars: 7
- Watchers: 2
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# vim-tslint
[](https://travis-ci.org/heavenshell/vim-tslint)
An asynchronous Tslint for Vim.

## Invoke manually
Open TypeScript file and just execute `:Tslint`.
## Automatically lint on save
```viml
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.
```viml
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