Skip to content

[Feature]: Print warning when overriding TSConfig settings #5116

@yohny

Description

@yohny

🚀 Feature Proposal

Currently ts-jest is overriding module setting in tsconfig.json to commonjs without notifying user in any way. It would be helpful to notify users that this is happenig and possibly a link to docs explaining whats going on.

Motivation

Many modern javascript runtimes natively support also ESM modules loading and thus a lot of people use other than commonjs module setting (especially if targeting Node) in their tsconfig.json. When they include the jest+ts-jest in their project, its very hard to figure out why the tests are failing with module loading erros or even not compiling in ts-jest, if one is unaware that ts-jest actually behind the scenes changes your module setting.
If other tsconfig values are overriden, they should also produce warning.

Optionally the execution could be stopped completely until user provides dedicated tsconfig for ts-jest, that does not need any everrides.

some existing issues that this could help clarify:
#4198
#4195

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions