diff --git a/internal/core/compileroptions.go b/internal/core/compileroptions.go
index 35e0600f57..844465642b 100644
--- a/internal/core/compileroptions.go
+++ b/internal/core/compileroptions.go
@@ -47,6 +47,7 @@ type CompilerOptions struct {
ForceConsistentCasingInFileNames Tristate `json:"forceConsistentCasingInFileNames,omitzero"`
IsolatedModules Tristate `json:"isolatedModules,omitzero"`
IsolatedDeclarations Tristate `json:"isolatedDeclarations,omitzero"`
+ IgnoreConfig Tristate `json:"ignoreConfig,omitzero"`
IgnoreDeprecations string `json:"ignoreDeprecations,omitzero"`
ImportHelpers Tristate `json:"importHelpers,omitzero"`
InlineSourceMap Tristate `json:"inlineSourceMap,omitzero"`
diff --git a/internal/diagnostics/diagnostics_generated.go b/internal/diagnostics/diagnostics_generated.go
index 1c9410eeac..4625c8d4a6 100644
--- a/internal/diagnostics/diagnostics_generated.go
+++ b/internal/diagnostics/diagnostics_generated.go
@@ -920,6 +920,8 @@ var Importing_a_JSON_file_into_an_ECMAScript_module_requires_a_type_Colon_json_i
var Named_imports_from_a_JSON_file_into_an_ECMAScript_module_are_not_allowed_when_module_is_set_to_0 = &Message{code: 1544, category: CategoryError, key: "Named_imports_from_a_JSON_file_into_an_ECMAScript_module_are_not_allowed_when_module_is_set_to_0_1544", text: "Named imports from a JSON file into an ECMAScript module are not allowed when 'module' is set to '{0}'."}
+var Ignore_the_tsconfig_found_and_build_with_commandline_options_and_files = &Message{code: 1547, category: CategoryMessage, key: "Ignore_the_tsconfig_found_and_build_with_commandline_options_and_files_1547", text: "Ignore the tsconfig found and build with commandline options and files."}
+
var The_types_of_0_are_incompatible_between_these_types = &Message{code: 2200, category: CategoryError, key: "The_types_of_0_are_incompatible_between_these_types_2200", text: "The types of '{0}' are incompatible between these types."}
var The_types_returned_by_0_are_incompatible_between_these_types = &Message{code: 2201, category: CategoryError, key: "The_types_returned_by_0_are_incompatible_between_these_types_2201", text: "The types returned by '{0}' are incompatible between these types."}
@@ -2344,6 +2346,8 @@ var Option_moduleResolution_must_be_set_to_0_or_left_unspecified_when_option_mod
var Option_module_must_be_set_to_0_when_option_moduleResolution_is_set_to_1 = &Message{code: 5110, category: CategoryError, key: "Option_module_must_be_set_to_0_when_option_moduleResolution_is_set_to_1_5110", text: "Option 'module' must be set to '{0}' when option 'moduleResolution' is set to '{1}'."}
+var X_tsconfig_json_is_present_but_will_not_be_loaded_if_files_are_specified_on_commandline_Use_ignoreConfig_to_skip_this_error = &Message{code: 5111, category: CategoryError, key: "tsconfig_json_is_present_but_will_not_be_loaded_if_files_are_specified_on_commandline_Use_ignoreConf_5111", text: "tsconfig.json is present but will not be loaded if files are specified on commandline. Use '--ignoreConfig' to skip this error."}
+
var Generates_a_sourcemap_for_each_corresponding_d_ts_file = &Message{code: 6000, category: CategoryMessage, key: "Generates_a_sourcemap_for_each_corresponding_d_ts_file_6000", text: "Generates a sourcemap for each corresponding '.d.ts' file."}
var Concatenate_and_emit_output_to_single_file = &Message{code: 6001, category: CategoryMessage, key: "Concatenate_and_emit_output_to_single_file_6001", text: "Concatenate and emit output to single file."}
diff --git a/internal/diagnostics/extraDiagnosticMessages.json b/internal/diagnostics/extraDiagnosticMessages.json
index b735a67695..b9a2e1160f 100644
--- a/internal/diagnostics/extraDiagnosticMessages.json
+++ b/internal/diagnostics/extraDiagnosticMessages.json
@@ -38,5 +38,13 @@
"Project '{0}' is out of date because it has errors.": {
"category": "Message",
"code": 6423
+ },
+ "Ignore the tsconfig found and build with commandline options and files.": {
+ "category": "Message",
+ "code": 1547
+ },
+ "tsconfig.json is present but will not be loaded if files are specified on commandline. Use '--ignoreConfig' to skip this error.": {
+ "category": "Error",
+ "code": 5111
}
}
diff --git a/internal/execute/tsc.go b/internal/execute/tsc.go
index 65bf8d43bb..11405fff1e 100644
--- a/internal/execute/tsc.go
+++ b/internal/execute/tsc.go
@@ -151,19 +151,24 @@ func tscCompilation(sys tsc.System, commandLine *tsoptions.ParsedCommandLine, te
return tsc.CommandLineResult{Status: tsc.ExitStatusDiagnosticsPresent_OutputsSkipped}
}
}
- } else if len(commandLine.FileNames()) == 0 {
+ } else if !commandLine.CompilerOptions().IgnoreConfig.IsTrue() || len(commandLine.FileNames()) == 0 {
searchPath := tspath.NormalizePath(sys.GetCurrentDirectory())
configFileName = findConfigFile(searchPath, sys.FS().FileExists, "tsconfig.json")
- }
-
- if configFileName == "" && len(commandLine.FileNames()) == 0 {
- if commandLine.CompilerOptions().ShowConfig.IsTrue() {
- reportDiagnostic(ast.NewCompilerDiagnostic(diagnostics.Cannot_find_a_tsconfig_json_file_at_the_current_directory_Colon_0, tspath.NormalizePath(sys.GetCurrentDirectory())))
- } else {
- tsc.PrintVersion(sys)
- tsc.PrintHelp(sys, commandLine)
+ if len(commandLine.FileNames()) != 0 {
+ if configFileName != "" {
+ // Error to not specify config file
+ reportDiagnostic(ast.NewCompilerDiagnostic(diagnostics.X_tsconfig_json_is_present_but_will_not_be_loaded_if_files_are_specified_on_commandline_Use_ignoreConfig_to_skip_this_error))
+ return tsc.CommandLineResult{Status: tsc.ExitStatusDiagnosticsPresent_OutputsSkipped}
+ }
+ } else if configFileName == "" {
+ if commandLine.CompilerOptions().ShowConfig.IsTrue() {
+ reportDiagnostic(ast.NewCompilerDiagnostic(diagnostics.Cannot_find_a_tsconfig_json_file_at_the_current_directory_Colon_0, tspath.NormalizePath(sys.GetCurrentDirectory())))
+ } else {
+ tsc.PrintVersion(sys)
+ tsc.PrintHelp(sys, commandLine)
+ }
+ return tsc.CommandLineResult{Status: tsc.ExitStatusDiagnosticsPresent_OutputsSkipped}
}
- return tsc.CommandLineResult{Status: tsc.ExitStatusDiagnosticsPresent_OutputsSkipped}
}
// !!! convert to options with absolute paths is usually done here, but for ease of implementation, it's done in `tsoptions.ParseCommandLine()`
diff --git a/internal/execute/tsctests/tsc_test.go b/internal/execute/tsctests/tsc_test.go
index 31f0f94911..9b8eac6680 100644
--- a/internal/execute/tsctests/tsc_test.go
+++ b/internal/execute/tsctests/tsc_test.go
@@ -919,6 +919,59 @@ func TestTscExtends(t *testing.T) {
}
}
+func TestTscIgnoreConfig(t *testing.T) {
+ t.Parallel()
+ filesWithoutConfig := func() FileMap {
+ return FileMap{
+ "/home/src/workspaces/project/src/a.ts": "export const a = 10;",
+ "/home/src/workspaces/project/src/b.ts": "export const b = 10;",
+ "/home/src/workspaces/project/c.ts": "export const c = 10;",
+ }
+ }
+ filesWithConfig := func() FileMap {
+ files := filesWithoutConfig()
+ files["/home/src/workspaces/project/tsconfig.json"] = stringtestutil.Dedent(`
+ {
+ "include": ["src"],
+ }`)
+ return files
+ }
+ getScenarios := func(subScenario string, commandLineArgs []string) []*tscInput {
+ commandLineArgsIgnoreConfig := append(commandLineArgs, "--ignoreConfig")
+ return []*tscInput{
+ {
+ subScenario: subScenario,
+ files: filesWithConfig(),
+ commandLineArgs: commandLineArgs,
+ },
+ {
+ subScenario: subScenario + " with --ignoreConfig",
+ files: filesWithConfig(),
+ commandLineArgs: commandLineArgsIgnoreConfig,
+ },
+ {
+ subScenario: subScenario + " when config file absent",
+ files: filesWithoutConfig(),
+ commandLineArgs: commandLineArgs,
+ },
+ {
+ subScenario: subScenario + " when config file absent with --ignoreConfig",
+ files: filesWithoutConfig(),
+ commandLineArgs: commandLineArgsIgnoreConfig,
+ },
+ }
+ }
+ testCases := slices.Concat(
+ getScenarios("without any options", nil),
+ getScenarios("specifying files", []string{"src/a.ts"}),
+ getScenarios("specifying project", []string{"-p", "."}),
+ getScenarios("mixing project and files", []string{"-p", ".", "src/a.ts", "c.ts"}),
+ )
+ for _, test := range testCases {
+ test.run(t, "ignoreConfig")
+ }
+}
+
func TestTscIncremental(t *testing.T) {
t.Parallel()
getConstEnumTest := func(bdsContents string, changeEnumFile string, testSuffix string) *tscInput {
diff --git a/internal/tsoptions/declscompiler.go b/internal/tsoptions/declscompiler.go
index 1223b52df5..4288cba0c8 100644
--- a/internal/tsoptions/declscompiler.go
+++ b/internal/tsoptions/declscompiler.go
@@ -290,6 +290,15 @@ var optionsForCompiler = []*CommandLineOption{
Description: diagnostics.Print_names_of_files_that_are_part_of_the_compilation_and_then_stop_processing,
DefaultValueDescription: false,
},
+ {
+ Name: "ignoreConfig",
+ Kind: CommandLineOptionTypeBoolean,
+ ShowInSimplifiedHelpView: true,
+ Category: diagnostics.Command_line_Options,
+ IsCommandLineOnly: true,
+ Description: diagnostics.Ignore_the_tsconfig_found_and_build_with_commandline_options_and_files,
+ DefaultValueDescription: false,
+ },
// Basic
// targetOptionDeclaration,
diff --git a/internal/tsoptions/parsinghelpers.go b/internal/tsoptions/parsinghelpers.go
index bf16518be2..56880ce3fb 100644
--- a/internal/tsoptions/parsinghelpers.go
+++ b/internal/tsoptions/parsinghelpers.go
@@ -259,6 +259,8 @@ func parseCompilerOptions(key string, value any, allOptions *core.CompilerOption
allOptions.GenerateTrace = parseString(value)
case "isolatedModules":
allOptions.IsolatedModules = parseTristate(value)
+ case "ignoreConfig":
+ allOptions.IgnoreConfig = parseTristate(value)
case "ignoreDeprecations":
allOptions.IgnoreDeprecations = parseString(value)
case "importHelpers":
diff --git a/testdata/baselines/reference/tsc/commandLine/does-not-add-color-when-NO_COLOR-is-set.js b/testdata/baselines/reference/tsc/commandLine/does-not-add-color-when-NO_COLOR-is-set.js
index b874e0df4d..2aeb59abba 100644
--- a/testdata/baselines/reference/tsc/commandLine/does-not-add-color-when-NO_COLOR-is-set.js
+++ b/testdata/baselines/reference/tsc/commandLine/does-not-add-color-when-NO_COLOR-is-set.js
@@ -55,6 +55,9 @@ Compile the project given the path to its configuration file, or to a folder wit
--showConfig
Print the final configuration instead of building.
+--ignoreConfig
+Ignore the tsconfig found and build with commandline options and files.
+
--build, -b
Build one or more projects and their dependencies, if out of date
diff --git a/testdata/baselines/reference/tsc/commandLine/help.js b/testdata/baselines/reference/tsc/commandLine/help.js
index 74d5bff71e..2d049cb512 100644
--- a/testdata/baselines/reference/tsc/commandLine/help.js
+++ b/testdata/baselines/reference/tsc/commandLine/help.js
@@ -54,6 +54,9 @@ Compile the project given the path to its configuration file, or to a folder wit
[94m--showConfig[39m
Print the final configuration instead of building.
+[94m--ignoreConfig[39m
+Ignore the tsconfig found and build with commandline options and files.
+
[94m--build, -b[39m
Build one or more projects and their dependencies, if out of date
diff --git a/testdata/baselines/reference/tsc/commandLine/show-help-with-ExitStatus.DiagnosticsPresent_OutputsSkipped-when-host-cannot-provide-terminal-width.js b/testdata/baselines/reference/tsc/commandLine/show-help-with-ExitStatus.DiagnosticsPresent_OutputsSkipped-when-host-cannot-provide-terminal-width.js
index 755231ecf2..b72b404539 100644
--- a/testdata/baselines/reference/tsc/commandLine/show-help-with-ExitStatus.DiagnosticsPresent_OutputsSkipped-when-host-cannot-provide-terminal-width.js
+++ b/testdata/baselines/reference/tsc/commandLine/show-help-with-ExitStatus.DiagnosticsPresent_OutputsSkipped-when-host-cannot-provide-terminal-width.js
@@ -55,6 +55,9 @@ Compile the project given the path to its configuration file, or to a folder wit
[94m--showConfig[39m
Print the final configuration instead of building.
+[94m--ignoreConfig[39m
+Ignore the tsconfig found and build with commandline options and files.
+
[94m--build, -b[39m
Build one or more projects and their dependencies, if out of date
diff --git a/testdata/baselines/reference/tsc/commandLine/show-help-with-ExitStatus.DiagnosticsPresent_OutputsSkipped.js b/testdata/baselines/reference/tsc/commandLine/show-help-with-ExitStatus.DiagnosticsPresent_OutputsSkipped.js
index a53b791e93..070c2a2be0 100644
--- a/testdata/baselines/reference/tsc/commandLine/show-help-with-ExitStatus.DiagnosticsPresent_OutputsSkipped.js
+++ b/testdata/baselines/reference/tsc/commandLine/show-help-with-ExitStatus.DiagnosticsPresent_OutputsSkipped.js
@@ -34,28 +34,31 @@ tsc: The TypeScript Compiler - Version FakeTSVersion
[1mCOMMAND LINE FLAGS[22m
-[94m --help, -h [39mPrint this message.
+[94m --help, -h [39mPrint this message.
-[94m --watch, -w [39mWatch input files.
+[94m --watch, -w [39mWatch input files.
-[94m --all [39mShow all compiler options.
+[94m --all [39mShow all compiler options.
-[94m --version, -v [39mPrint the compiler's version.
+[94m --version, -v [39mPrint the compiler's version.
-[94m --init [39mInitializes a TypeScript project and creates a tsconfig.json file.
+[94m --init [39mInitializes a TypeScript project and creates a tsconfig.json file.
-[94m --project, -p [39mCompile the project given the path to its configuration file, or to a folder with a 'tsconfig.json'.
+[94m --project, -p [39mCompile the project given the path to its configuration file, or to a folder with a 'tsconfig.json'.
-[94m --showConfig [39mPrint the final configuration instead of building.
+[94m --showConfig [39mPrint the final configuration instead of building.
-[94m --build, -b [39mBuild one or more projects and their dependencies, if out of date
+[94m --ignoreConfig [39mIgnore the tsconfig found and build with commandline options and files.
+
+
+[94m --build, -b [39mBuild one or more projects and their dependencies, if out of date
[1mCOMMON COMPILER OPTIONS[22m
diff --git a/testdata/baselines/reference/tsc/ignoreConfig/mixing-project-and-files-when-config-file-absent-with---ignoreConfig.js b/testdata/baselines/reference/tsc/ignoreConfig/mixing-project-and-files-when-config-file-absent-with---ignoreConfig.js
new file mode 100644
index 0000000000..74d6e07863
--- /dev/null
+++ b/testdata/baselines/reference/tsc/ignoreConfig/mixing-project-and-files-when-config-file-absent-with---ignoreConfig.js
@@ -0,0 +1,15 @@
+currentDirectory::/home/src/workspaces/project
+useCaseSensitiveFileNames::true
+Input::
+//// [/home/src/workspaces/project/c.ts] *new*
+export const c = 10;
+//// [/home/src/workspaces/project/src/a.ts] *new*
+export const a = 10;
+//// [/home/src/workspaces/project/src/b.ts] *new*
+export const b = 10;
+
+tsgo -p . src/a.ts c.ts --ignoreConfig
+ExitStatus:: DiagnosticsPresent_OutputsSkipped
+Output::
+[91merror[0m[90m TS5042: [0mOption 'project' cannot be mixed with source files on a command line.
+
diff --git a/testdata/baselines/reference/tsc/ignoreConfig/mixing-project-and-files-when-config-file-absent.js b/testdata/baselines/reference/tsc/ignoreConfig/mixing-project-and-files-when-config-file-absent.js
new file mode 100644
index 0000000000..c557a4537a
--- /dev/null
+++ b/testdata/baselines/reference/tsc/ignoreConfig/mixing-project-and-files-when-config-file-absent.js
@@ -0,0 +1,15 @@
+currentDirectory::/home/src/workspaces/project
+useCaseSensitiveFileNames::true
+Input::
+//// [/home/src/workspaces/project/c.ts] *new*
+export const c = 10;
+//// [/home/src/workspaces/project/src/a.ts] *new*
+export const a = 10;
+//// [/home/src/workspaces/project/src/b.ts] *new*
+export const b = 10;
+
+tsgo -p . src/a.ts c.ts
+ExitStatus:: DiagnosticsPresent_OutputsSkipped
+Output::
+[91merror[0m[90m TS5042: [0mOption 'project' cannot be mixed with source files on a command line.
+
diff --git a/testdata/baselines/reference/tsc/ignoreConfig/mixing-project-and-files-with---ignoreConfig.js b/testdata/baselines/reference/tsc/ignoreConfig/mixing-project-and-files-with---ignoreConfig.js
new file mode 100644
index 0000000000..f325237920
--- /dev/null
+++ b/testdata/baselines/reference/tsc/ignoreConfig/mixing-project-and-files-with---ignoreConfig.js
@@ -0,0 +1,19 @@
+currentDirectory::/home/src/workspaces/project
+useCaseSensitiveFileNames::true
+Input::
+//// [/home/src/workspaces/project/c.ts] *new*
+export const c = 10;
+//// [/home/src/workspaces/project/src/a.ts] *new*
+export const a = 10;
+//// [/home/src/workspaces/project/src/b.ts] *new*
+export const b = 10;
+//// [/home/src/workspaces/project/tsconfig.json] *new*
+{
+ "include": ["src"],
+}
+
+tsgo -p . src/a.ts c.ts --ignoreConfig
+ExitStatus:: DiagnosticsPresent_OutputsSkipped
+Output::
+[91merror[0m[90m TS5042: [0mOption 'project' cannot be mixed with source files on a command line.
+
diff --git a/testdata/baselines/reference/tsc/ignoreConfig/mixing-project-and-files.js b/testdata/baselines/reference/tsc/ignoreConfig/mixing-project-and-files.js
new file mode 100644
index 0000000000..35141cbcc6
--- /dev/null
+++ b/testdata/baselines/reference/tsc/ignoreConfig/mixing-project-and-files.js
@@ -0,0 +1,19 @@
+currentDirectory::/home/src/workspaces/project
+useCaseSensitiveFileNames::true
+Input::
+//// [/home/src/workspaces/project/c.ts] *new*
+export const c = 10;
+//// [/home/src/workspaces/project/src/a.ts] *new*
+export const a = 10;
+//// [/home/src/workspaces/project/src/b.ts] *new*
+export const b = 10;
+//// [/home/src/workspaces/project/tsconfig.json] *new*
+{
+ "include": ["src"],
+}
+
+tsgo -p . src/a.ts c.ts
+ExitStatus:: DiagnosticsPresent_OutputsSkipped
+Output::
+[91merror[0m[90m TS5042: [0mOption 'project' cannot be mixed with source files on a command line.
+
diff --git a/testdata/baselines/reference/tsc/ignoreConfig/specifying-files-when-config-file-absent-with---ignoreConfig.js b/testdata/baselines/reference/tsc/ignoreConfig/specifying-files-when-config-file-absent-with---ignoreConfig.js
new file mode 100644
index 0000000000..47a583d164
--- /dev/null
+++ b/testdata/baselines/reference/tsc/ignoreConfig/specifying-files-when-config-file-absent-with---ignoreConfig.js
@@ -0,0 +1,43 @@
+currentDirectory::/home/src/workspaces/project
+useCaseSensitiveFileNames::true
+Input::
+//// [/home/src/workspaces/project/c.ts] *new*
+export const c = 10;
+//// [/home/src/workspaces/project/src/a.ts] *new*
+export const a = 10;
+//// [/home/src/workspaces/project/src/b.ts] *new*
+export const b = 10;
+
+tsgo src/a.ts --ignoreConfig
+ExitStatus:: Success
+Output::
+//// [/home/src/tslibs/TS/Lib/lib.d.ts] *Lib*
+///
+interface Boolean {}
+interface Function {}
+interface CallableFunction {}
+interface NewableFunction {}
+interface IArguments {}
+interface Number { toExponential: any; }
+interface Object {}
+interface RegExp {}
+interface String { charAt: any; }
+interface Array { length: number; [n: number]: T; }
+interface ReadonlyArray {}
+interface SymbolConstructor {
+ (desc?: string | number): symbol;
+ for(name: string): symbol;
+ readonly toStringTag: symbol;
+}
+declare var Symbol: SymbolConstructor;
+interface Symbol {
+ readonly [Symbol.toStringTag]: string;
+}
+declare const console: { log(msg: any): void; };
+//// [/home/src/workspaces/project/src/a.js] *new*
+"use strict";
+Object.defineProperty(exports, "__esModule", { value: true });
+exports.a = void 0;
+exports.a = 10;
+
+
diff --git a/testdata/baselines/reference/tsc/ignoreConfig/specifying-files-when-config-file-absent.js b/testdata/baselines/reference/tsc/ignoreConfig/specifying-files-when-config-file-absent.js
new file mode 100644
index 0000000000..c6a8afd92d
--- /dev/null
+++ b/testdata/baselines/reference/tsc/ignoreConfig/specifying-files-when-config-file-absent.js
@@ -0,0 +1,43 @@
+currentDirectory::/home/src/workspaces/project
+useCaseSensitiveFileNames::true
+Input::
+//// [/home/src/workspaces/project/c.ts] *new*
+export const c = 10;
+//// [/home/src/workspaces/project/src/a.ts] *new*
+export const a = 10;
+//// [/home/src/workspaces/project/src/b.ts] *new*
+export const b = 10;
+
+tsgo src/a.ts
+ExitStatus:: Success
+Output::
+//// [/home/src/tslibs/TS/Lib/lib.d.ts] *Lib*
+///
+interface Boolean {}
+interface Function {}
+interface CallableFunction {}
+interface NewableFunction {}
+interface IArguments {}
+interface Number { toExponential: any; }
+interface Object {}
+interface RegExp {}
+interface String { charAt: any; }
+interface Array { length: number; [n: number]: T; }
+interface ReadonlyArray {}
+interface SymbolConstructor {
+ (desc?: string | number): symbol;
+ for(name: string): symbol;
+ readonly toStringTag: symbol;
+}
+declare var Symbol: SymbolConstructor;
+interface Symbol {
+ readonly [Symbol.toStringTag]: string;
+}
+declare const console: { log(msg: any): void; };
+//// [/home/src/workspaces/project/src/a.js] *new*
+"use strict";
+Object.defineProperty(exports, "__esModule", { value: true });
+exports.a = void 0;
+exports.a = 10;
+
+
diff --git a/testdata/baselines/reference/tsc/ignoreConfig/specifying-files-with---ignoreConfig.js b/testdata/baselines/reference/tsc/ignoreConfig/specifying-files-with---ignoreConfig.js
new file mode 100644
index 0000000000..5803cbdefd
--- /dev/null
+++ b/testdata/baselines/reference/tsc/ignoreConfig/specifying-files-with---ignoreConfig.js
@@ -0,0 +1,47 @@
+currentDirectory::/home/src/workspaces/project
+useCaseSensitiveFileNames::true
+Input::
+//// [/home/src/workspaces/project/c.ts] *new*
+export const c = 10;
+//// [/home/src/workspaces/project/src/a.ts] *new*
+export const a = 10;
+//// [/home/src/workspaces/project/src/b.ts] *new*
+export const b = 10;
+//// [/home/src/workspaces/project/tsconfig.json] *new*
+{
+ "include": ["src"],
+}
+
+tsgo src/a.ts --ignoreConfig
+ExitStatus:: Success
+Output::
+//// [/home/src/tslibs/TS/Lib/lib.d.ts] *Lib*
+///
+interface Boolean {}
+interface Function {}
+interface CallableFunction {}
+interface NewableFunction {}
+interface IArguments {}
+interface Number { toExponential: any; }
+interface Object {}
+interface RegExp {}
+interface String { charAt: any; }
+interface Array { length: number; [n: number]: T; }
+interface ReadonlyArray {}
+interface SymbolConstructor {
+ (desc?: string | number): symbol;
+ for(name: string): symbol;
+ readonly toStringTag: symbol;
+}
+declare var Symbol: SymbolConstructor;
+interface Symbol {
+ readonly [Symbol.toStringTag]: string;
+}
+declare const console: { log(msg: any): void; };
+//// [/home/src/workspaces/project/src/a.js] *new*
+"use strict";
+Object.defineProperty(exports, "__esModule", { value: true });
+exports.a = void 0;
+exports.a = 10;
+
+
diff --git a/testdata/baselines/reference/tsc/ignoreConfig/specifying-files.js b/testdata/baselines/reference/tsc/ignoreConfig/specifying-files.js
new file mode 100644
index 0000000000..ad781717a1
--- /dev/null
+++ b/testdata/baselines/reference/tsc/ignoreConfig/specifying-files.js
@@ -0,0 +1,19 @@
+currentDirectory::/home/src/workspaces/project
+useCaseSensitiveFileNames::true
+Input::
+//// [/home/src/workspaces/project/c.ts] *new*
+export const c = 10;
+//// [/home/src/workspaces/project/src/a.ts] *new*
+export const a = 10;
+//// [/home/src/workspaces/project/src/b.ts] *new*
+export const b = 10;
+//// [/home/src/workspaces/project/tsconfig.json] *new*
+{
+ "include": ["src"],
+}
+
+tsgo src/a.ts
+ExitStatus:: DiagnosticsPresent_OutputsSkipped
+Output::
+[91merror[0m[90m TS5111: [0mtsconfig.json is present but will not be loaded if files are specified on commandline. Use '--ignoreConfig' to skip this error.
+
diff --git a/testdata/baselines/reference/tsc/ignoreConfig/specifying-project-when-config-file-absent-with---ignoreConfig.js b/testdata/baselines/reference/tsc/ignoreConfig/specifying-project-when-config-file-absent-with---ignoreConfig.js
new file mode 100644
index 0000000000..ed09be7914
--- /dev/null
+++ b/testdata/baselines/reference/tsc/ignoreConfig/specifying-project-when-config-file-absent-with---ignoreConfig.js
@@ -0,0 +1,15 @@
+currentDirectory::/home/src/workspaces/project
+useCaseSensitiveFileNames::true
+Input::
+//// [/home/src/workspaces/project/c.ts] *new*
+export const c = 10;
+//// [/home/src/workspaces/project/src/a.ts] *new*
+export const a = 10;
+//// [/home/src/workspaces/project/src/b.ts] *new*
+export const b = 10;
+
+tsgo -p . --ignoreConfig
+ExitStatus:: DiagnosticsPresent_OutputsSkipped
+Output::
+[91merror[0m[90m TS5081: [0mCannot find a tsconfig.json file at the current directory: /home/src/workspaces/project/tsconfig.json.
+
diff --git a/testdata/baselines/reference/tsc/ignoreConfig/specifying-project-when-config-file-absent.js b/testdata/baselines/reference/tsc/ignoreConfig/specifying-project-when-config-file-absent.js
new file mode 100644
index 0000000000..c8d7560ae5
--- /dev/null
+++ b/testdata/baselines/reference/tsc/ignoreConfig/specifying-project-when-config-file-absent.js
@@ -0,0 +1,15 @@
+currentDirectory::/home/src/workspaces/project
+useCaseSensitiveFileNames::true
+Input::
+//// [/home/src/workspaces/project/c.ts] *new*
+export const c = 10;
+//// [/home/src/workspaces/project/src/a.ts] *new*
+export const a = 10;
+//// [/home/src/workspaces/project/src/b.ts] *new*
+export const b = 10;
+
+tsgo -p .
+ExitStatus:: DiagnosticsPresent_OutputsSkipped
+Output::
+[91merror[0m[90m TS5081: [0mCannot find a tsconfig.json file at the current directory: /home/src/workspaces/project/tsconfig.json.
+
diff --git a/testdata/baselines/reference/tsc/ignoreConfig/specifying-project-with---ignoreConfig.js b/testdata/baselines/reference/tsc/ignoreConfig/specifying-project-with---ignoreConfig.js
new file mode 100644
index 0000000000..ba70a4cca3
--- /dev/null
+++ b/testdata/baselines/reference/tsc/ignoreConfig/specifying-project-with---ignoreConfig.js
@@ -0,0 +1,53 @@
+currentDirectory::/home/src/workspaces/project
+useCaseSensitiveFileNames::true
+Input::
+//// [/home/src/workspaces/project/c.ts] *new*
+export const c = 10;
+//// [/home/src/workspaces/project/src/a.ts] *new*
+export const a = 10;
+//// [/home/src/workspaces/project/src/b.ts] *new*
+export const b = 10;
+//// [/home/src/workspaces/project/tsconfig.json] *new*
+{
+ "include": ["src"],
+}
+
+tsgo -p . --ignoreConfig
+ExitStatus:: Success
+Output::
+//// [/home/src/tslibs/TS/Lib/lib.d.ts] *Lib*
+///
+interface Boolean {}
+interface Function {}
+interface CallableFunction {}
+interface NewableFunction {}
+interface IArguments {}
+interface Number { toExponential: any; }
+interface Object {}
+interface RegExp {}
+interface String { charAt: any; }
+interface Array { length: number; [n: number]: T; }
+interface ReadonlyArray {}
+interface SymbolConstructor {
+ (desc?: string | number): symbol;
+ for(name: string): symbol;
+ readonly toStringTag: symbol;
+}
+declare var Symbol: SymbolConstructor;
+interface Symbol {
+ readonly [Symbol.toStringTag]: string;
+}
+declare const console: { log(msg: any): void; };
+//// [/home/src/workspaces/project/src/a.js] *new*
+"use strict";
+Object.defineProperty(exports, "__esModule", { value: true });
+exports.a = void 0;
+exports.a = 10;
+
+//// [/home/src/workspaces/project/src/b.js] *new*
+"use strict";
+Object.defineProperty(exports, "__esModule", { value: true });
+exports.b = void 0;
+exports.b = 10;
+
+
diff --git a/testdata/baselines/reference/tsc/ignoreConfig/specifying-project.js b/testdata/baselines/reference/tsc/ignoreConfig/specifying-project.js
new file mode 100644
index 0000000000..da6ef69692
--- /dev/null
+++ b/testdata/baselines/reference/tsc/ignoreConfig/specifying-project.js
@@ -0,0 +1,53 @@
+currentDirectory::/home/src/workspaces/project
+useCaseSensitiveFileNames::true
+Input::
+//// [/home/src/workspaces/project/c.ts] *new*
+export const c = 10;
+//// [/home/src/workspaces/project/src/a.ts] *new*
+export const a = 10;
+//// [/home/src/workspaces/project/src/b.ts] *new*
+export const b = 10;
+//// [/home/src/workspaces/project/tsconfig.json] *new*
+{
+ "include": ["src"],
+}
+
+tsgo -p .
+ExitStatus:: Success
+Output::
+//// [/home/src/tslibs/TS/Lib/lib.d.ts] *Lib*
+///
+interface Boolean {}
+interface Function {}
+interface CallableFunction {}
+interface NewableFunction {}
+interface IArguments {}
+interface Number { toExponential: any; }
+interface Object {}
+interface RegExp {}
+interface String { charAt: any; }
+interface Array { length: number; [n: number]: T; }
+interface ReadonlyArray {}
+interface SymbolConstructor {
+ (desc?: string | number): symbol;
+ for(name: string): symbol;
+ readonly toStringTag: symbol;
+}
+declare var Symbol: SymbolConstructor;
+interface Symbol {
+ readonly [Symbol.toStringTag]: string;
+}
+declare const console: { log(msg: any): void; };
+//// [/home/src/workspaces/project/src/a.js] *new*
+"use strict";
+Object.defineProperty(exports, "__esModule", { value: true });
+exports.a = void 0;
+exports.a = 10;
+
+//// [/home/src/workspaces/project/src/b.js] *new*
+"use strict";
+Object.defineProperty(exports, "__esModule", { value: true });
+exports.b = void 0;
+exports.b = 10;
+
+
diff --git a/testdata/baselines/reference/tsc/ignoreConfig/without-any-options-when-config-file-absent-with---ignoreConfig.js b/testdata/baselines/reference/tsc/ignoreConfig/without-any-options-when-config-file-absent-with---ignoreConfig.js
new file mode 100644
index 0000000000..2906935439
--- /dev/null
+++ b/testdata/baselines/reference/tsc/ignoreConfig/without-any-options-when-config-file-absent-with---ignoreConfig.js
@@ -0,0 +1,158 @@
+currentDirectory::/home/src/workspaces/project
+useCaseSensitiveFileNames::true
+Input::
+//// [/home/src/workspaces/project/c.ts] *new*
+export const c = 10;
+//// [/home/src/workspaces/project/src/a.ts] *new*
+export const a = 10;
+//// [/home/src/workspaces/project/src/b.ts] *new*
+export const b = 10;
+
+tsgo --ignoreConfig
+ExitStatus:: DiagnosticsPresent_OutputsSkipped
+Output::
+Version FakeTSVersion
+tsc: The TypeScript Compiler - Version FakeTSVersion
+
+[1mCOMMON COMMANDS[22m
+
+ [94mtsc[39m
+ Compiles the current project (tsconfig.json in the working directory.)
+
+ [94mtsc app.ts util.ts[39m
+ Ignoring tsconfig.json, compiles the specified files with default compiler options.
+
+ [94mtsc -b[39m
+ Build a composite project in the working directory.
+
+ [94mtsc --init[39m
+ Creates a tsconfig.json with the recommended settings in the working directory.
+
+ [94mtsc -p ./path/to/tsconfig.json[39m
+ Compiles the TypeScript project located at the specified path.
+
+ [94mtsc --help --all[39m
+ An expanded version of this information, showing all possible compiler options
+
+ [94mtsc --noEmit[39m
+ [94mtsc --target esnext[39m
+ Compiles the current project, with additional settings.
+
+[1mCOMMAND LINE FLAGS[22m
+
+[94m--help, -h[39m
+Print this message.
+
+[94m--watch, -w[39m
+Watch input files.
+
+[94m--all[39m
+Show all compiler options.
+
+[94m--version, -v[39m
+Print the compiler's version.
+
+[94m--init[39m
+Initializes a TypeScript project and creates a tsconfig.json file.
+
+[94m--project, -p[39m
+Compile the project given the path to its configuration file, or to a folder with a 'tsconfig.json'.
+
+[94m--showConfig[39m
+Print the final configuration instead of building.
+
+[94m--ignoreConfig[39m
+Ignore the tsconfig found and build with commandline options and files.
+
+[94m--build, -b[39m
+Build one or more projects and their dependencies, if out of date
+
+[1mCOMMON COMPILER OPTIONS[22m
+
+[94m--pretty[39m
+Enable color and formatting in TypeScript's output to make compiler errors easier to read.
+type: boolean
+default: true
+
+[94m--declaration, -d[39m
+Generate .d.ts files from TypeScript and JavaScript files in your project.
+type: boolean
+default: `false`, unless `composite` is set
+
+[94m--declarationMap[39m
+Create sourcemaps for d.ts files.
+type: boolean
+default: false
+
+[94m--emitDeclarationOnly[39m
+Only output d.ts files and not JavaScript files.
+type: boolean
+default: false
+
+[94m--sourceMap[39m
+Create source map files for emitted JavaScript files.
+type: boolean
+default: false
+
+[94m--noEmit[39m
+Disable emitting files from a compilation.
+type: boolean
+default: false
+
+[94m--target, -t[39m
+Set the JavaScript language version for emitted JavaScript and include compatible library declarations.
+one of: es5, es6/es2015, es2016, es2017, es2018, es2019, es2020, es2021, es2022, es2023, es2024, esnext
+default: es5
+
+[94m--module, -m[39m
+Specify what module code is generated.
+one of: none, commonjs, amd, system, umd, es6/es2015, es2020, es2022, esnext, node16, node18, nodenext, preserve
+default: undefined
+
+[94m--lib[39m
+Specify a set of bundled library declaration files that describe the target runtime environment.
+one or more: es5, es6/es2015, es7/es2016, es2017, es2018, es2019, es2020, es2021, es2022, es2023, es2024, esnext, dom, dom.iterable, dom.asynciterable, webworker, webworker.importscripts, webworker.iterable, webworker.asynciterable, scripthost, es2015.core, es2015.collection, es2015.generator, es2015.iterable, es2015.promise, es2015.proxy, es2015.reflect, es2015.symbol, es2015.symbol.wellknown, es2016.array.include, es2016.intl, es2017.arraybuffer, es2017.date, es2017.object, es2017.sharedmemory, es2017.string, es2017.intl, es2017.typedarrays, es2018.asyncgenerator, es2018.asynciterable/esnext.asynciterable, es2018.intl, es2018.promise, es2018.regexp, es2019.array, es2019.object, es2019.string, es2019.symbol/esnext.symbol, es2019.intl, es2020.bigint/esnext.bigint, es2020.date, es2020.promise, es2020.sharedmemory, es2020.string, es2020.symbol.wellknown, es2020.intl, es2020.number, es2021.promise, es2021.string, es2021.weakref/esnext.weakref, es2021.intl, es2022.array, es2022.error, es2022.intl, es2022.object, es2022.string, es2022.regexp, es2023.array, es2023.collection, es2023.intl, es2024.arraybuffer, es2024.collection, es2024.object/esnext.object, es2024.promise, es2024.regexp/esnext.regexp, es2024.sharedmemory, es2024.string/esnext.string, esnext.array, esnext.collection, esnext.intl, esnext.disposable, esnext.promise, esnext.decorators, esnext.iterator, esnext.float16, decorators, decorators.legacy
+default: undefined
+
+[94m--allowJs[39m
+Allow JavaScript files to be a part of your program. Use the 'checkJS' option to get errors from these files.
+type: boolean
+default: false
+
+[94m--checkJs[39m
+Enable error reporting in type-checked JavaScript files.
+type: boolean
+default: false
+
+[94m--jsx[39m
+Specify what JSX code is generated.
+one of: preserve, react-native, react, react-jsx, react-jsxdev
+default: undefined
+
+[94m--outFile[39m
+Specify a file that bundles all outputs into one JavaScript file. If 'declaration' is true, also designates a file that bundles all .d.ts output.
+
+[94m--outDir[39m
+Specify an output folder for all emitted files.
+
+[94m--removeComments[39m
+Disable emitting comments.
+type: boolean
+default: false
+
+[94m--strict[39m
+Enable all strict type-checking options.
+type: boolean
+default: false
+
+[94m--types[39m
+Specify type package names to be included without being referenced in a source file.
+
+[94m--esModuleInterop[39m
+Emit additional JavaScript to ease support for importing CommonJS modules. This enables 'allowSyntheticDefaultImports' for type compatibility.
+type: boolean
+default: false
+
+You can learn about all of the compiler options at https://aka.ms/tsc
+
+
diff --git a/testdata/baselines/reference/tsc/ignoreConfig/without-any-options-when-config-file-absent.js b/testdata/baselines/reference/tsc/ignoreConfig/without-any-options-when-config-file-absent.js
new file mode 100644
index 0000000000..34a4ddaecf
--- /dev/null
+++ b/testdata/baselines/reference/tsc/ignoreConfig/without-any-options-when-config-file-absent.js
@@ -0,0 +1,158 @@
+currentDirectory::/home/src/workspaces/project
+useCaseSensitiveFileNames::true
+Input::
+//// [/home/src/workspaces/project/c.ts] *new*
+export const c = 10;
+//// [/home/src/workspaces/project/src/a.ts] *new*
+export const a = 10;
+//// [/home/src/workspaces/project/src/b.ts] *new*
+export const b = 10;
+
+tsgo
+ExitStatus:: DiagnosticsPresent_OutputsSkipped
+Output::
+Version FakeTSVersion
+tsc: The TypeScript Compiler - Version FakeTSVersion
+
+[1mCOMMON COMMANDS[22m
+
+ [94mtsc[39m
+ Compiles the current project (tsconfig.json in the working directory.)
+
+ [94mtsc app.ts util.ts[39m
+ Ignoring tsconfig.json, compiles the specified files with default compiler options.
+
+ [94mtsc -b[39m
+ Build a composite project in the working directory.
+
+ [94mtsc --init[39m
+ Creates a tsconfig.json with the recommended settings in the working directory.
+
+ [94mtsc -p ./path/to/tsconfig.json[39m
+ Compiles the TypeScript project located at the specified path.
+
+ [94mtsc --help --all[39m
+ An expanded version of this information, showing all possible compiler options
+
+ [94mtsc --noEmit[39m
+ [94mtsc --target esnext[39m
+ Compiles the current project, with additional settings.
+
+[1mCOMMAND LINE FLAGS[22m
+
+[94m--help, -h[39m
+Print this message.
+
+[94m--watch, -w[39m
+Watch input files.
+
+[94m--all[39m
+Show all compiler options.
+
+[94m--version, -v[39m
+Print the compiler's version.
+
+[94m--init[39m
+Initializes a TypeScript project and creates a tsconfig.json file.
+
+[94m--project, -p[39m
+Compile the project given the path to its configuration file, or to a folder with a 'tsconfig.json'.
+
+[94m--showConfig[39m
+Print the final configuration instead of building.
+
+[94m--ignoreConfig[39m
+Ignore the tsconfig found and build with commandline options and files.
+
+[94m--build, -b[39m
+Build one or more projects and their dependencies, if out of date
+
+[1mCOMMON COMPILER OPTIONS[22m
+
+[94m--pretty[39m
+Enable color and formatting in TypeScript's output to make compiler errors easier to read.
+type: boolean
+default: true
+
+[94m--declaration, -d[39m
+Generate .d.ts files from TypeScript and JavaScript files in your project.
+type: boolean
+default: `false`, unless `composite` is set
+
+[94m--declarationMap[39m
+Create sourcemaps for d.ts files.
+type: boolean
+default: false
+
+[94m--emitDeclarationOnly[39m
+Only output d.ts files and not JavaScript files.
+type: boolean
+default: false
+
+[94m--sourceMap[39m
+Create source map files for emitted JavaScript files.
+type: boolean
+default: false
+
+[94m--noEmit[39m
+Disable emitting files from a compilation.
+type: boolean
+default: false
+
+[94m--target, -t[39m
+Set the JavaScript language version for emitted JavaScript and include compatible library declarations.
+one of: es5, es6/es2015, es2016, es2017, es2018, es2019, es2020, es2021, es2022, es2023, es2024, esnext
+default: es5
+
+[94m--module, -m[39m
+Specify what module code is generated.
+one of: none, commonjs, amd, system, umd, es6/es2015, es2020, es2022, esnext, node16, node18, nodenext, preserve
+default: undefined
+
+[94m--lib[39m
+Specify a set of bundled library declaration files that describe the target runtime environment.
+one or more: es5, es6/es2015, es7/es2016, es2017, es2018, es2019, es2020, es2021, es2022, es2023, es2024, esnext, dom, dom.iterable, dom.asynciterable, webworker, webworker.importscripts, webworker.iterable, webworker.asynciterable, scripthost, es2015.core, es2015.collection, es2015.generator, es2015.iterable, es2015.promise, es2015.proxy, es2015.reflect, es2015.symbol, es2015.symbol.wellknown, es2016.array.include, es2016.intl, es2017.arraybuffer, es2017.date, es2017.object, es2017.sharedmemory, es2017.string, es2017.intl, es2017.typedarrays, es2018.asyncgenerator, es2018.asynciterable/esnext.asynciterable, es2018.intl, es2018.promise, es2018.regexp, es2019.array, es2019.object, es2019.string, es2019.symbol/esnext.symbol, es2019.intl, es2020.bigint/esnext.bigint, es2020.date, es2020.promise, es2020.sharedmemory, es2020.string, es2020.symbol.wellknown, es2020.intl, es2020.number, es2021.promise, es2021.string, es2021.weakref/esnext.weakref, es2021.intl, es2022.array, es2022.error, es2022.intl, es2022.object, es2022.string, es2022.regexp, es2023.array, es2023.collection, es2023.intl, es2024.arraybuffer, es2024.collection, es2024.object/esnext.object, es2024.promise, es2024.regexp/esnext.regexp, es2024.sharedmemory, es2024.string/esnext.string, esnext.array, esnext.collection, esnext.intl, esnext.disposable, esnext.promise, esnext.decorators, esnext.iterator, esnext.float16, decorators, decorators.legacy
+default: undefined
+
+[94m--allowJs[39m
+Allow JavaScript files to be a part of your program. Use the 'checkJS' option to get errors from these files.
+type: boolean
+default: false
+
+[94m--checkJs[39m
+Enable error reporting in type-checked JavaScript files.
+type: boolean
+default: false
+
+[94m--jsx[39m
+Specify what JSX code is generated.
+one of: preserve, react-native, react, react-jsx, react-jsxdev
+default: undefined
+
+[94m--outFile[39m
+Specify a file that bundles all outputs into one JavaScript file. If 'declaration' is true, also designates a file that bundles all .d.ts output.
+
+[94m--outDir[39m
+Specify an output folder for all emitted files.
+
+[94m--removeComments[39m
+Disable emitting comments.
+type: boolean
+default: false
+
+[94m--strict[39m
+Enable all strict type-checking options.
+type: boolean
+default: false
+
+[94m--types[39m
+Specify type package names to be included without being referenced in a source file.
+
+[94m--esModuleInterop[39m
+Emit additional JavaScript to ease support for importing CommonJS modules. This enables 'allowSyntheticDefaultImports' for type compatibility.
+type: boolean
+default: false
+
+You can learn about all of the compiler options at https://aka.ms/tsc
+
+
diff --git a/testdata/baselines/reference/tsc/ignoreConfig/without-any-options-with---ignoreConfig.js b/testdata/baselines/reference/tsc/ignoreConfig/without-any-options-with---ignoreConfig.js
new file mode 100644
index 0000000000..34690eb99a
--- /dev/null
+++ b/testdata/baselines/reference/tsc/ignoreConfig/without-any-options-with---ignoreConfig.js
@@ -0,0 +1,53 @@
+currentDirectory::/home/src/workspaces/project
+useCaseSensitiveFileNames::true
+Input::
+//// [/home/src/workspaces/project/c.ts] *new*
+export const c = 10;
+//// [/home/src/workspaces/project/src/a.ts] *new*
+export const a = 10;
+//// [/home/src/workspaces/project/src/b.ts] *new*
+export const b = 10;
+//// [/home/src/workspaces/project/tsconfig.json] *new*
+{
+ "include": ["src"],
+}
+
+tsgo --ignoreConfig
+ExitStatus:: Success
+Output::
+//// [/home/src/tslibs/TS/Lib/lib.d.ts] *Lib*
+///
+interface Boolean {}
+interface Function {}
+interface CallableFunction {}
+interface NewableFunction {}
+interface IArguments {}
+interface Number { toExponential: any; }
+interface Object {}
+interface RegExp {}
+interface String { charAt: any; }
+interface Array { length: number; [n: number]: T; }
+interface ReadonlyArray {}
+interface SymbolConstructor {
+ (desc?: string | number): symbol;
+ for(name: string): symbol;
+ readonly toStringTag: symbol;
+}
+declare var Symbol: SymbolConstructor;
+interface Symbol {
+ readonly [Symbol.toStringTag]: string;
+}
+declare const console: { log(msg: any): void; };
+//// [/home/src/workspaces/project/src/a.js] *new*
+"use strict";
+Object.defineProperty(exports, "__esModule", { value: true });
+exports.a = void 0;
+exports.a = 10;
+
+//// [/home/src/workspaces/project/src/b.js] *new*
+"use strict";
+Object.defineProperty(exports, "__esModule", { value: true });
+exports.b = void 0;
+exports.b = 10;
+
+
diff --git a/testdata/baselines/reference/tsc/ignoreConfig/without-any-options.js b/testdata/baselines/reference/tsc/ignoreConfig/without-any-options.js
new file mode 100644
index 0000000000..c131036837
--- /dev/null
+++ b/testdata/baselines/reference/tsc/ignoreConfig/without-any-options.js
@@ -0,0 +1,53 @@
+currentDirectory::/home/src/workspaces/project
+useCaseSensitiveFileNames::true
+Input::
+//// [/home/src/workspaces/project/c.ts] *new*
+export const c = 10;
+//// [/home/src/workspaces/project/src/a.ts] *new*
+export const a = 10;
+//// [/home/src/workspaces/project/src/b.ts] *new*
+export const b = 10;
+//// [/home/src/workspaces/project/tsconfig.json] *new*
+{
+ "include": ["src"],
+}
+
+tsgo
+ExitStatus:: Success
+Output::
+//// [/home/src/tslibs/TS/Lib/lib.d.ts] *Lib*
+///
+interface Boolean {}
+interface Function {}
+interface CallableFunction {}
+interface NewableFunction {}
+interface IArguments {}
+interface Number { toExponential: any; }
+interface Object {}
+interface RegExp {}
+interface String { charAt: any; }
+interface Array { length: number; [n: number]: T; }
+interface ReadonlyArray {}
+interface SymbolConstructor {
+ (desc?: string | number): symbol;
+ for(name: string): symbol;
+ readonly toStringTag: symbol;
+}
+declare var Symbol: SymbolConstructor;
+interface Symbol {
+ readonly [Symbol.toStringTag]: string;
+}
+declare const console: { log(msg: any): void; };
+//// [/home/src/workspaces/project/src/a.js] *new*
+"use strict";
+Object.defineProperty(exports, "__esModule", { value: true });
+exports.a = void 0;
+exports.a = 10;
+
+//// [/home/src/workspaces/project/src/b.js] *new*
+"use strict";
+Object.defineProperty(exports, "__esModule", { value: true });
+exports.b = void 0;
+exports.b = 10;
+
+
diff --git a/testdata/baselines/reference/tscWatch/commandLine/Parse-watch-interval-option-without-tsconfig.json.js b/testdata/baselines/reference/tscWatch/commandLine/Parse-watch-interval-option-without-tsconfig.json.js
index 164937402c..ddf4e53d3d 100644
--- a/testdata/baselines/reference/tscWatch/commandLine/Parse-watch-interval-option-without-tsconfig.json.js
+++ b/testdata/baselines/reference/tscWatch/commandLine/Parse-watch-interval-option-without-tsconfig.json.js
@@ -55,6 +55,9 @@ Compile the project given the path to its configuration file, or to a folder wit
[94m--showConfig[39m
Print the final configuration instead of building.
+[94m--ignoreConfig[39m
+Ignore the tsconfig found and build with commandline options and files.
+
[94m--build, -b[39m
Build one or more projects and their dependencies, if out of date