From 2d0bb98cf227995c964570c7ecc82641bd3d043a Mon Sep 17 00:00:00 2001 From: LCD 47 Date: Thu, 3 Dec 2015 18:39:16 +0200 Subject: [PATCH] Allow ESLint to check typescript files. --- plugin/syntastic.vim | 2 +- syntax_checkers/typescript/eslint.vim | 25 +++++++++++++++++++++++++ 2 files changed, 26 insertions(+), 1 deletion(-) create mode 100644 syntax_checkers/typescript/eslint.vim diff --git a/plugin/syntastic.vim b/plugin/syntastic.vim index 7c9efa14..de9eb76f 100644 --- a/plugin/syntastic.vim +++ b/plugin/syntastic.vim @@ -19,7 +19,7 @@ if has('reltime') lockvar! g:_SYNTASTIC_START endif -let g:_SYNTASTIC_VERSION = '3.7.0-48' +let g:_SYNTASTIC_VERSION = '3.7.0-49' lockvar g:_SYNTASTIC_VERSION " Sanity checks {{{1 diff --git a/syntax_checkers/typescript/eslint.vim b/syntax_checkers/typescript/eslint.vim new file mode 100644 index 00000000..9d9f87e3 --- /dev/null +++ b/syntax_checkers/typescript/eslint.vim @@ -0,0 +1,25 @@ +"============================================================================ +"File: eslint.vim +"Description: Syntax checking plugin for syntastic +"Maintainer: LCD 47 +"License: This program is free software. It comes without any warranty, +" to the extent permitted by applicable law. You can redistribute +" it and/or modify it under the terms of the Do What The Fuck You +" Want To Public License, Version 2, as published by Sam Hocevar. +" See http://sam.zoy.org/wtfpl/COPYING for more details. +" +"============================================================================ + +if exists('g:loaded_syntastic_typescript_eslint_checker') + finish +endif +let g:loaded_syntastic_typescript_eslint_checker = 1 + +runtime! syntax_checkers/javascript/*.vim + +call g:SyntasticRegistry.CreateAndRegisterChecker({ + \ 'filetype': 'typescript', + \ 'name': 'eslint', + \ 'redirect': 'javascript/eslint'}) + +" vim: set sw=4 sts=4 et fdm=marker: