Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

set "include" tsc config option to empty string to prevent normal include settings from applying #5

Closed
sjungwirth opened this issue Apr 30, 2020 · 6 comments · Fixed by #18

Comments

@sjungwirth
Copy link

my project has a tsconfig w/ an include option specified, but it seems the intent of this project is only to test specific files.

overwriting any include option in the base tsconfig will prevent unintended checking of other files.

@gustavopch
Copy link
Owner

@sjungwirth I'm not sure if I understand the issue. Are you afraid that tsc-files will mess your tsconfig.json? What do you believe should be changed to cover your use case?

@sjungwirth
Copy link
Author

in https://github.com/gustavopch/tsc-files/blob/master/lib/index.js#L22-L32 where the existing config is loaded, if the include https://www.typescriptlang.org/tsconfig#include option is used then those files are also include in the tsc check. Shouldn't this util only run against the files https://github.com/gustavopch/tsc-files/blob/master/lib/index.js#L37 specified?

@gustavopch
Copy link
Owner

@sjungwirth Got it. Thanks for the detailed explanation.

I found this article saying that:

When both the files and include properties are specified, the compiler includes the union of the specified files.

So we should probably make sure we always omit the include property in the generated config, right?

@IPWright83
Copy link
Contributor

If I understand correctly, this means that tsc-files isn't really going to save any time if include is being used then?

@sjungwirth Got it. Thanks for the detailed explanation.

I found this article saying that:

When both the files and include properties are specified, the compiler includes the union of the specified files.

So we should probably make sure we always omit the include property in the generated config, right?

@gustavopch
Copy link
Owner

@IPWright83 I just tested here. Yes, all files in include would be processed in addition to the files explicitly passed to the CLI. Thanks for your PR.

@IPWright83
Copy link
Contributor

@gustavopch thanks for merging quickly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants