Skip to content

jsx, checkJs, and possibly more options must be tracked as affectsSemanticDiagnostics #53391

Closed
@DanielRosenwasser

Description

@DanielRosenwasser

Someone on Twitter mentioned that updating the jsx option in their editor was not updating their errors.

https://twitter.com/cromas/status/1636995012482453505

I looked into this and noticed that both --jsx and --checkJs are not tracked as affectsSemanticDiagnostics.

{
name: "checkJs",
type: "boolean",
showInSimplifiedHelpView: true,
category: Diagnostics.JavaScript_Support,
description: Diagnostics.Enable_error_reporting_in_type_checked_JavaScript_files,
defaultValueDescription: false,
},
{
name: "jsx",
type: jsxOptionMap,
affectsSourceFile: true,
affectsEmit: true,
affectsBuildInfo: true,
affectsModuleResolution: true,
paramType: Diagnostics.KIND,
showInSimplifiedHelpView: true,
category: Diagnostics.Language_and_Environment,
description: Diagnostics.Specify_what_JSX_code_is_generated,
defaultValueDescription: undefined,
},

In fact, I wonder if checkJs also needs the same options as allowJs (i.e. affectsModuleResolution: true) since one turns the other on implicitly.

{
name: "allowJs",
type: "boolean",
affectsModuleResolution: true,
showInSimplifiedHelpView: true,
category: Diagnostics.JavaScript_Support,
description: Diagnostics.Allow_JavaScript_files_to_be_a_part_of_your_program_Use_the_checkJS_option_to_get_errors_from_these_files,
defaultValueDescription: false,
},

Metadata

Metadata

Assignees

Labels

BugA bug in TypeScriptDomain: --incrementalThe issue relates to incremental compilationFix AvailableA PR has been opened for this issue

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions