@@ -43,20 +43,12 @@ namespace ts {
43
43
return s ;
44
44
}
45
45
46
- function isJSONSupported ( ) {
47
- return typeof JSON === "object" && typeof JSON . parse === "function" ;
48
- }
49
-
50
46
export function executeCommandLine ( args : string [ ] ) : void {
51
47
const commandLine = parseCommandLine ( args ) ;
52
48
53
49
// Configuration file name (if any)
54
50
let configFileName : string ;
55
51
if ( commandLine . options . locale ) {
56
- if ( ! isJSONSupported ( ) ) {
57
- reportDiagnostic ( createCompilerDiagnostic ( Diagnostics . The_current_host_does_not_support_the_0_option , "--locale" ) ) ;
58
- return sys . exit ( ExitStatus . DiagnosticsPresent_OutputsSkipped ) ;
59
- }
60
52
validateLocaleAndSetLanguage ( commandLine . options . locale , sys , commandLine . errors ) ;
61
53
}
62
54
@@ -84,10 +76,6 @@ namespace ts {
84
76
}
85
77
86
78
if ( commandLine . options . project ) {
87
- if ( ! isJSONSupported ( ) ) {
88
- reportDiagnostic ( createCompilerDiagnostic ( Diagnostics . The_current_host_does_not_support_the_0_option , "--project" ) ) ;
89
- return sys . exit ( ExitStatus . DiagnosticsPresent_OutputsSkipped ) ;
90
- }
91
79
if ( commandLine . fileNames . length !== 0 ) {
92
80
reportDiagnostic ( createCompilerDiagnostic ( Diagnostics . Option_project_cannot_be_mixed_with_source_files_on_a_command_line ) ) ;
93
81
return sys . exit ( ExitStatus . DiagnosticsPresent_OutputsSkipped ) ;
@@ -109,7 +97,7 @@ namespace ts {
109
97
}
110
98
}
111
99
}
112
- else if ( commandLine . fileNames . length === 0 && isJSONSupported ( ) ) {
100
+ else if ( commandLine . fileNames . length === 0 ) {
113
101
const searchPath = normalizePath ( sys . getCurrentDirectory ( ) ) ;
114
102
configFileName = findConfigFile ( searchPath , sys . fileExists ) ;
115
103
}
0 commit comments