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)
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.
Most helpful comment
But should not it pick the configuration from the project root? If there is a
tsconfig.jsonon the root of the project it currently does not respect it. This means I will have to uselet 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.