From 4de8af366d4305f391f021f06f922ab4375c68d2 Mon Sep 17 00:00:00 2001 From: Kevin Brey Date: Thu, 16 Oct 2025 09:53:01 -0500 Subject: [PATCH 1/3] add allowJs default value description --- src/compiler/commandLineParser.ts | 2 +- src/compiler/diagnosticMessages.json | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) 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", From ded34cf05f619ed7f7a4f363e9c7585500c01aed Mon Sep 17 00:00:00 2001 From: Kevin Brey Date: Thu, 16 Oct 2025 10:55:38 -0500 Subject: [PATCH 2/3] update test baselines --- ...does-not-add-color-when-NO_COLOR-is-set.js | 26 +++++++++---------- .../reference/tsc/commandLine/help-all.js | 26 +++++++++---------- .../reference/tsc/commandLine/help.js | 26 +++++++++---------- ...-when-host-can't-provide-terminal-width.js | 26 +++++++++---------- ...tatus.DiagnosticsPresent_OutputsSkipped.js | 26 +++++++++---------- 5 files changed, 65 insertions(+), 65 deletions(-) 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..4853405cc1e4a 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 @@ -1,6 +1,6 @@ -currentDirectory:: /home/src/workspaces/project useCaseSensitiveFileNames:: false -Input:: -//// [/home/src/tslibs/TS/Lib/lib.d.ts] +currentDirectory:: /home/src/workspaces/project useCaseSensitiveFileNames:: false +Input:: +//// [/home/src/tslibs/TS/Lib/lib.d.ts] interface Boolean {} interface Function {} interface CallableFunction {} @@ -12,11 +12,11 @@ interface RegExp {} interface String { charAt: any; } interface Array { length: number; [n: number]: T; } interface ReadonlyArray {} -declare const console: { log(msg: any): void; }; - - -/home/src/tslibs/TS/Lib/tsc.js -Output:: +declare const console: { log(msg: any): void; }; + + +/home/src/tslibs/TS/Lib/tsc.js +Output:: Version FakeTSVersion tsc: The TypeScript Compiler - Version FakeTSVersion @@ -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. @@ -158,7 +158,7 @@ default: false You can learn about all of the compiler options at https://aka.ms/tsc - - - -exitCode:: ExitStatus.DiagnosticsPresent_OutputsSkipped + + + +exitCode:: ExitStatus.DiagnosticsPresent_OutputsSkipped diff --git a/tests/baselines/reference/tsc/commandLine/help-all.js b/tests/baselines/reference/tsc/commandLine/help-all.js index 11e16a0603137..1f054949c53fd 100644 --- a/tests/baselines/reference/tsc/commandLine/help-all.js +++ b/tests/baselines/reference/tsc/commandLine/help-all.js @@ -1,6 +1,6 @@ -currentDirectory:: /home/src/workspaces/project useCaseSensitiveFileNames:: false -Input:: -//// [/home/src/tslibs/TS/Lib/lib.d.ts] +currentDirectory:: /home/src/workspaces/project useCaseSensitiveFileNames:: false +Input:: +//// [/home/src/tslibs/TS/Lib/lib.d.ts] interface Boolean {} interface Function {} interface CallableFunction {} @@ -12,11 +12,11 @@ interface RegExp {} interface String { charAt: any; } interface Array { length: number; [n: number]: T; } interface ReadonlyArray {} -declare const console: { log(msg: any): void; }; - - -/home/src/tslibs/TS/Lib/tsc.js --help --all -Output:: +declare const console: { log(msg: any): void; }; + + +/home/src/tslibs/TS/Lib/tsc.js --help --all +Output:: tsc: The TypeScript Compiler - Version FakeTSVersion ALL COMPILER OPTIONS @@ -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. @@ -687,7 +687,7 @@ Delete the outputs of all projects. --stopBuildOnErrors Skip building downstream projects on error in upstream project. - - - -exitCode:: ExitStatus.Success + + + +exitCode:: ExitStatus.Success diff --git a/tests/baselines/reference/tsc/commandLine/help.js b/tests/baselines/reference/tsc/commandLine/help.js index ceeacaed38e66..9ed55bad11536 100644 --- a/tests/baselines/reference/tsc/commandLine/help.js +++ b/tests/baselines/reference/tsc/commandLine/help.js @@ -1,6 +1,6 @@ -currentDirectory:: /home/src/workspaces/project useCaseSensitiveFileNames:: false -Input:: -//// [/home/src/tslibs/TS/Lib/lib.d.ts] +currentDirectory:: /home/src/workspaces/project useCaseSensitiveFileNames:: false +Input:: +//// [/home/src/tslibs/TS/Lib/lib.d.ts] interface Boolean {} interface Function {} interface CallableFunction {} @@ -12,11 +12,11 @@ interface RegExp {} interface String { charAt: any; } interface Array { length: number; [n: number]: T; } interface ReadonlyArray {} -declare const console: { log(msg: any): void; }; - - -/home/src/tslibs/TS/Lib/tsc.js --help -Output:: +declare const console: { log(msg: any): void; }; + + +/home/src/tslibs/TS/Lib/tsc.js --help +Output:: tsc: The TypeScript Compiler - Version FakeTSVersion COMMON COMMANDS @@ -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. @@ -157,7 +157,7 @@ default: false You can learn about all of the compiler options at https://aka.ms/tsc - - - -exitCode:: ExitStatus.Success + + + +exitCode:: ExitStatus.Success 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..c38a4a600a082 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 @@ -1,6 +1,6 @@ -currentDirectory:: /home/src/workspaces/project useCaseSensitiveFileNames:: false -Input:: -//// [/home/src/tslibs/TS/Lib/lib.d.ts] +currentDirectory:: /home/src/workspaces/project useCaseSensitiveFileNames:: false +Input:: +//// [/home/src/tslibs/TS/Lib/lib.d.ts] interface Boolean {} interface Function {} interface CallableFunction {} @@ -12,11 +12,11 @@ interface RegExp {} interface String { charAt: any; } interface Array { length: number; [n: number]: T; } interface ReadonlyArray {} -declare const console: { log(msg: any): void; }; - - -/home/src/tslibs/TS/Lib/tsc.js -Output:: +declare const console: { log(msg: any): void; }; + + +/home/src/tslibs/TS/Lib/tsc.js +Output:: Version FakeTSVersion tsc: The TypeScript Compiler - Version FakeTSVersion @@ -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. @@ -158,7 +158,7 @@ default: false You can learn about all of the compiler options at https://aka.ms/tsc - - - -exitCode:: ExitStatus.DiagnosticsPresent_OutputsSkipped + + + +exitCode:: ExitStatus.DiagnosticsPresent_OutputsSkipped 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..c38a4a600a082 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 @@ -1,6 +1,6 @@ -currentDirectory:: /home/src/workspaces/project useCaseSensitiveFileNames:: false -Input:: -//// [/home/src/tslibs/TS/Lib/lib.d.ts] +currentDirectory:: /home/src/workspaces/project useCaseSensitiveFileNames:: false +Input:: +//// [/home/src/tslibs/TS/Lib/lib.d.ts] interface Boolean {} interface Function {} interface CallableFunction {} @@ -12,11 +12,11 @@ interface RegExp {} interface String { charAt: any; } interface Array { length: number; [n: number]: T; } interface ReadonlyArray {} -declare const console: { log(msg: any): void; }; - - -/home/src/tslibs/TS/Lib/tsc.js -Output:: +declare const console: { log(msg: any): void; }; + + +/home/src/tslibs/TS/Lib/tsc.js +Output:: Version FakeTSVersion tsc: The TypeScript Compiler - Version FakeTSVersion @@ -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. @@ -158,7 +158,7 @@ default: false You can learn about all of the compiler options at https://aka.ms/tsc - - - -exitCode:: ExitStatus.DiagnosticsPresent_OutputsSkipped + + + +exitCode:: ExitStatus.DiagnosticsPresent_OutputsSkipped From 06547e77de0d96d1cd2fed91011c4d8b10b44f03 Mon Sep 17 00:00:00 2001 From: Kevin Brey Date: Thu, 16 Oct 2025 11:05:43 -0500 Subject: [PATCH 3/3] accept baselines --- ...does-not-add-color-when-NO_COLOR-is-set.js | 24 +++++++++---------- .../reference/tsc/commandLine/help-all.js | 24 +++++++++---------- .../reference/tsc/commandLine/help.js | 24 +++++++++---------- ...-when-host-can't-provide-terminal-width.js | 24 +++++++++---------- ...tatus.DiagnosticsPresent_OutputsSkipped.js | 24 +++++++++---------- 5 files changed, 60 insertions(+), 60 deletions(-) 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 4853405cc1e4a..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 @@ -1,6 +1,6 @@ -currentDirectory:: /home/src/workspaces/project useCaseSensitiveFileNames:: false -Input:: -//// [/home/src/tslibs/TS/Lib/lib.d.ts] +currentDirectory:: /home/src/workspaces/project useCaseSensitiveFileNames:: false +Input:: +//// [/home/src/tslibs/TS/Lib/lib.d.ts] interface Boolean {} interface Function {} interface CallableFunction {} @@ -12,11 +12,11 @@ interface RegExp {} interface String { charAt: any; } interface Array { length: number; [n: number]: T; } interface ReadonlyArray {} -declare const console: { log(msg: any): void; }; - - -/home/src/tslibs/TS/Lib/tsc.js -Output:: +declare const console: { log(msg: any): void; }; + + +/home/src/tslibs/TS/Lib/tsc.js +Output:: Version FakeTSVersion tsc: The TypeScript Compiler - Version FakeTSVersion @@ -158,7 +158,7 @@ default: false You can learn about all of the compiler options at https://aka.ms/tsc - - - -exitCode:: ExitStatus.DiagnosticsPresent_OutputsSkipped + + + +exitCode:: ExitStatus.DiagnosticsPresent_OutputsSkipped diff --git a/tests/baselines/reference/tsc/commandLine/help-all.js b/tests/baselines/reference/tsc/commandLine/help-all.js index 1f054949c53fd..798166927aeeb 100644 --- a/tests/baselines/reference/tsc/commandLine/help-all.js +++ b/tests/baselines/reference/tsc/commandLine/help-all.js @@ -1,6 +1,6 @@ -currentDirectory:: /home/src/workspaces/project useCaseSensitiveFileNames:: false -Input:: -//// [/home/src/tslibs/TS/Lib/lib.d.ts] +currentDirectory:: /home/src/workspaces/project useCaseSensitiveFileNames:: false +Input:: +//// [/home/src/tslibs/TS/Lib/lib.d.ts] interface Boolean {} interface Function {} interface CallableFunction {} @@ -12,11 +12,11 @@ interface RegExp {} interface String { charAt: any; } interface Array { length: number; [n: number]: T; } interface ReadonlyArray {} -declare const console: { log(msg: any): void; }; - - -/home/src/tslibs/TS/Lib/tsc.js --help --all -Output:: +declare const console: { log(msg: any): void; }; + + +/home/src/tslibs/TS/Lib/tsc.js --help --all +Output:: tsc: The TypeScript Compiler - Version FakeTSVersion ALL COMPILER OPTIONS @@ -687,7 +687,7 @@ Delete the outputs of all projects. --stopBuildOnErrors Skip building downstream projects on error in upstream project. - - - -exitCode:: ExitStatus.Success + + + +exitCode:: ExitStatus.Success diff --git a/tests/baselines/reference/tsc/commandLine/help.js b/tests/baselines/reference/tsc/commandLine/help.js index 9ed55bad11536..a0cbf0a3bcdcc 100644 --- a/tests/baselines/reference/tsc/commandLine/help.js +++ b/tests/baselines/reference/tsc/commandLine/help.js @@ -1,6 +1,6 @@ -currentDirectory:: /home/src/workspaces/project useCaseSensitiveFileNames:: false -Input:: -//// [/home/src/tslibs/TS/Lib/lib.d.ts] +currentDirectory:: /home/src/workspaces/project useCaseSensitiveFileNames:: false +Input:: +//// [/home/src/tslibs/TS/Lib/lib.d.ts] interface Boolean {} interface Function {} interface CallableFunction {} @@ -12,11 +12,11 @@ interface RegExp {} interface String { charAt: any; } interface Array { length: number; [n: number]: T; } interface ReadonlyArray {} -declare const console: { log(msg: any): void; }; - - -/home/src/tslibs/TS/Lib/tsc.js --help -Output:: +declare const console: { log(msg: any): void; }; + + +/home/src/tslibs/TS/Lib/tsc.js --help +Output:: tsc: The TypeScript Compiler - Version FakeTSVersion COMMON COMMANDS @@ -157,7 +157,7 @@ default: false You can learn about all of the compiler options at https://aka.ms/tsc - - - -exitCode:: ExitStatus.Success + + + +exitCode:: ExitStatus.Success 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 c38a4a600a082..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 @@ -1,6 +1,6 @@ -currentDirectory:: /home/src/workspaces/project useCaseSensitiveFileNames:: false -Input:: -//// [/home/src/tslibs/TS/Lib/lib.d.ts] +currentDirectory:: /home/src/workspaces/project useCaseSensitiveFileNames:: false +Input:: +//// [/home/src/tslibs/TS/Lib/lib.d.ts] interface Boolean {} interface Function {} interface CallableFunction {} @@ -12,11 +12,11 @@ interface RegExp {} interface String { charAt: any; } interface Array { length: number; [n: number]: T; } interface ReadonlyArray {} -declare const console: { log(msg: any): void; }; - - -/home/src/tslibs/TS/Lib/tsc.js -Output:: +declare const console: { log(msg: any): void; }; + + +/home/src/tslibs/TS/Lib/tsc.js +Output:: Version FakeTSVersion tsc: The TypeScript Compiler - Version FakeTSVersion @@ -158,7 +158,7 @@ default: false You can learn about all of the compiler options at https://aka.ms/tsc - - - -exitCode:: ExitStatus.DiagnosticsPresent_OutputsSkipped + + + +exitCode:: ExitStatus.DiagnosticsPresent_OutputsSkipped 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 c38a4a600a082..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 @@ -1,6 +1,6 @@ -currentDirectory:: /home/src/workspaces/project useCaseSensitiveFileNames:: false -Input:: -//// [/home/src/tslibs/TS/Lib/lib.d.ts] +currentDirectory:: /home/src/workspaces/project useCaseSensitiveFileNames:: false +Input:: +//// [/home/src/tslibs/TS/Lib/lib.d.ts] interface Boolean {} interface Function {} interface CallableFunction {} @@ -12,11 +12,11 @@ interface RegExp {} interface String { charAt: any; } interface Array { length: number; [n: number]: T; } interface ReadonlyArray {} -declare const console: { log(msg: any): void; }; - - -/home/src/tslibs/TS/Lib/tsc.js -Output:: +declare const console: { log(msg: any): void; }; + + +/home/src/tslibs/TS/Lib/tsc.js +Output:: Version FakeTSVersion tsc: The TypeScript Compiler - Version FakeTSVersion @@ -158,7 +158,7 @@ default: false You can learn about all of the compiler options at https://aka.ms/tsc - - - -exitCode:: ExitStatus.DiagnosticsPresent_OutputsSkipped + + + +exitCode:: ExitStatus.DiagnosticsPresent_OutputsSkipped