diff --git a/src/compiler/commandLineParser.ts b/src/compiler/commandLineParser.ts index 7688aad98b845..2795b45515871 100644 --- a/src/compiler/commandLineParser.ts +++ b/src/compiler/commandLineParser.ts @@ -699,7 +699,7 @@ const commandOptionsWithoutBuild: CommandLineOption[] = [ 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, + defaultValueDescription: Diagnostics.false_unless_checkJs_is_set, }, { name: "checkJs", diff --git a/src/compiler/diagnosticMessages.json b/src/compiler/diagnosticMessages.json index 3d31d02ea8dbc..4ccbd0c325b0c 100644 --- a/src/compiler/diagnosticMessages.json +++ b/src/compiler/diagnosticMessages.json @@ -6699,6 +6699,10 @@ "category": "Error", "code": 6931 }, + "`false`, unless `checkJs` is set": { + "category": "Message", + "code": 6932 + }, "Variable '{0}' implicitly has an '{1}' type.": { "category": "Error", diff --git a/tests/baselines/reference/tsc/commandLine/does-not-add-color-when-NO_COLOR-is-set.js b/tests/baselines/reference/tsc/commandLine/does-not-add-color-when-NO_COLOR-is-set.js index 94f118c9de213..29b35c6766a55 100644 --- a/tests/baselines/reference/tsc/commandLine/does-not-add-color-when-NO_COLOR-is-set.js +++ b/tests/baselines/reference/tsc/commandLine/does-not-add-color-when-NO_COLOR-is-set.js @@ -120,7 +120,7 @@ default: undefined --allowJs Allow JavaScript files to be a part of your program. Use the 'checkJs' option to get errors from these files. type: boolean -default: false +default: `false`, unless `checkJs` is set --checkJs Enable error reporting in type-checked JavaScript files. diff --git a/tests/baselines/reference/tsc/commandLine/help-all.js b/tests/baselines/reference/tsc/commandLine/help-all.js index 11e16a0603137..798166927aeeb 100644 --- a/tests/baselines/reference/tsc/commandLine/help-all.js +++ b/tests/baselines/reference/tsc/commandLine/help-all.js @@ -147,7 +147,7 @@ Specify type package names to be included without being referenced in a source f --allowJs Allow JavaScript files to be a part of your program. Use the 'checkJs' option to get errors from these files. type: boolean -default: false +default: `false`, unless `checkJs` is set --checkJs Enable error reporting in type-checked JavaScript files. diff --git a/tests/baselines/reference/tsc/commandLine/help.js b/tests/baselines/reference/tsc/commandLine/help.js index ceeacaed38e66..a0cbf0a3bcdcc 100644 --- a/tests/baselines/reference/tsc/commandLine/help.js +++ b/tests/baselines/reference/tsc/commandLine/help.js @@ -119,7 +119,7 @@ default: undefined --allowJs Allow JavaScript files to be a part of your program. Use the 'checkJs' option to get errors from these files. type: boolean -default: false +default: `false`, unless `checkJs` is set --checkJs Enable error reporting in type-checked JavaScript files. diff --git a/tests/baselines/reference/tsc/commandLine/show-help-with-ExitStatus.DiagnosticsPresent_OutputsSkipped-when-host-can't-provide-terminal-width.js b/tests/baselines/reference/tsc/commandLine/show-help-with-ExitStatus.DiagnosticsPresent_OutputsSkipped-when-host-can't-provide-terminal-width.js index 9dc2e08154928..c0866e70cca98 100644 --- a/tests/baselines/reference/tsc/commandLine/show-help-with-ExitStatus.DiagnosticsPresent_OutputsSkipped-when-host-can't-provide-terminal-width.js +++ b/tests/baselines/reference/tsc/commandLine/show-help-with-ExitStatus.DiagnosticsPresent_OutputsSkipped-when-host-can't-provide-terminal-width.js @@ -120,7 +120,7 @@ default: undefined --allowJs Allow JavaScript files to be a part of your program. Use the 'checkJs' option to get errors from these files. type: boolean -default: false +default: `false`, unless `checkJs` is set --checkJs Enable error reporting in type-checked JavaScript files. diff --git a/tests/baselines/reference/tsc/commandLine/show-help-with-ExitStatus.DiagnosticsPresent_OutputsSkipped.js b/tests/baselines/reference/tsc/commandLine/show-help-with-ExitStatus.DiagnosticsPresent_OutputsSkipped.js index 9dc2e08154928..c0866e70cca98 100644 --- a/tests/baselines/reference/tsc/commandLine/show-help-with-ExitStatus.DiagnosticsPresent_OutputsSkipped.js +++ b/tests/baselines/reference/tsc/commandLine/show-help-with-ExitStatus.DiagnosticsPresent_OutputsSkipped.js @@ -120,7 +120,7 @@ default: undefined --allowJs Allow JavaScript files to be a part of your program. Use the 'checkJs' option to get errors from these files. type: boolean -default: false +default: `false`, unless `checkJs` is set --checkJs Enable error reporting in type-checked JavaScript files.