Syntastic: typescript/tsc checker: Allow configuring command line args

Created on 7 Dec 2013  路  3Comments  路  Source: vim-syntastic/syntastic

The syntastic checker for the TypeScript language uses the standard "tsc" compiler to check the source file.

Right now the "args" that are used for the tsc compiler is hardcoded as: --module commonjs

This should be configurable, so that users can set the options that are relevant for their project, for example: --target ES5 (enables the use of new language features) or --noImplicitAny (stronger error reporting)

Most helpful comment

But should not it pick the configuration from the project root? If there is a tsconfig.json on the root of the project it currently does not respect it. This means I will have to use let g:syntastic_typescript_tsc_args = '--target ES5' in my vim configuration. However if I have 2 project that uses seperate configuration, then it will not work.

I hope it makes sense.

All 3 comments

It isn't hardcoded. Please try adding something like this to your vimrc:

let g:syntastic_typescript_tsc_args = '--target ES5'

See :help syntastic-config-makeprg for more information.

I'm glad someone else was as ignorant as I. Thanks!

But should not it pick the configuration from the project root? If there is a tsconfig.json on the root of the project it currently does not respect it. This means I will have to use let g:syntastic_typescript_tsc_args = '--target ES5' in my vim configuration. However if I have 2 project that uses seperate configuration, then it will not work.

I hope it makes sense.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

duckpuppy picture duckpuppy  路  8Comments

ErikBjare picture ErikBjare  路  3Comments

jasonkuhrt picture jasonkuhrt  路  8Comments

PROgram52bc picture PROgram52bc  路  6Comments

stevepond picture stevepond  路  5Comments