-
Notifications
You must be signed in to change notification settings - Fork 13k
Description
The tsc binary does not allow to use a tsconfig.json with files as arguments in combination.
Why is this the case? Is there any reason for that? It would make things so much easier for third-party linting processes (such as the one in syntastic / VIM) as they simply could respect the identical config as the build setup.
The problem here is diversion of user-based config (flags for tsc to lint files that are setup in the IDE's config) to project-based config. If a project uses different flags (e.g. --module) you cannot migrate IDE configs easily to the JSON config in the tsconfig.json.
tsc --project /path/to/my/project/with/tsconfig.json/ somefile.ts someotherfile.ts
The above example is not possible because of the following error message:
error TS5042: Option 'project' cannot be mixed with source files on a command line.
Is there any chance the tsc binary can get a flag that can respect the tsconfig.json file's compiler options?
In an optimum world, someone could use something like this:
tsc --config /path/to/tsconfig.json somefile.ts someotherfile.ts;