Skip to content

Commit 6f409b5

Browse files
authored
Fix grammar issue (#12096)
* Fix grammar issue * Improve the error message * cr feedback
1 parent 6e6bea6 commit 6f409b5

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

src/compiler/commandLineParser.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -884,7 +884,7 @@ namespace ts {
884884
function tryExtendsName(extendedConfig: string): [string[], string[], string[], CompilerOptions] {
885885
// If the path isn't a rooted or relative path, don't try to resolve it (we reserve the right to special case module-id like paths in the future)
886886
if (!(isRootedDiskPath(extendedConfig) || startsWith(normalizeSlashes(extendedConfig), "./") || startsWith(normalizeSlashes(extendedConfig), "../"))) {
887-
errors.push(createCompilerDiagnostic(Diagnostics.The_path_in_an_extends_options_must_be_relative_or_rooted));
887+
errors.push(createCompilerDiagnostic(Diagnostics.A_path_in_an_extends_option_must_be_relative_or_rooted_but_0_is_not, extendedConfig));
888888
return;
889889
}
890890
let extendedConfigPath = toPath(extendedConfig, basePath, getCanonicalFileName);

src/compiler/diagnosticMessages.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3142,7 +3142,7 @@
31423142
"category": "Error",
31433143
"code": 18000
31443144
},
3145-
"The path in an 'extends' options must be relative or rooted.": {
3145+
"A path in an 'extends' option must be relative or rooted, but '{0}' is not.": {
31463146
"category": "Error",
31473147
"code": 18001
31483148
},

src/harness/unittests/configurationExtension.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -179,7 +179,7 @@ namespace ts {
179179
testFailure("can error when 'extends' is neither relative nor rooted.", "extends2.json", [{
180180
code: 18001,
181181
category: DiagnosticCategory.Error,
182-
messageText: `The path in an 'extends' options must be relative or rooted.`
182+
messageText: `A path in an 'extends' option must be relative or rooted, but 'configs/base' is not.`
183183
}]);
184184
});
185185
});

0 commit comments

Comments
 (0)