Skip to content

Conversation

@manbearwiz
Copy link
Contributor

@manbearwiz manbearwiz commented Oct 16, 2025

This pull request removes checkJs from the strictest configuration.

The strictest config currently enables checkJs. Since TypeScript 4.1, when allowJs is not explicitly defined, its value is inferred from checkJs. This results in strictest implicitly setting allowJs: true, which can lead to unexpected behavior and conflicts with other compiler options.

For example, using strictest with isolatedDeclarations: true causes the following error because allowJs and isolatedDeclarations cannot be used together:

Option 'allowJs' cannot be specified with option 'isolatedDeclarations'.

This change removes checkJs from the strictest configuration to prevent allowJs from being enabled by default.

For reference, here's the code

    allowJs: {
        dependencies: ["checkJs"],
        computeValue: compilerOptions => {
            return compilerOptions.allowJs === undefined ? !!compilerOptions.checkJs : compilerOptions.allowJs;
        },
    },


"isolatedModules": true,

"checkJs": true,
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why not just set allowJs explicitly false here? Then, downstream users can turn it on as though the default were false.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

TS doesn't allow that

 Option 'checkJs' cannot be specified without specifying option 'allowJs'.

@orta
Copy link
Member

orta commented Oct 29, 2025

This seems 👍🏻 to me

@orta orta merged commit 5257f31 into tsconfig:main Oct 29, 2025
1 check passed
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 this pull request may close these issues.

3 participants