mirror of
https://github.com/microsoft/TypeScript.git
synced 2025-12-14 15:33:32 -06:00
Handle package.json, jsconfig.json, tsconfig.json in the getDiagnostics of fourslash tests
This commit is contained in:
parent
8e16bfffc2
commit
fe260588fa
@ -507,8 +507,17 @@ namespace FourSlash {
|
||||
}
|
||||
|
||||
private getAllDiagnostics(): ts.Diagnostic[] {
|
||||
return ts.flatMap(this.languageServiceAdapterHost.getFilenames(), fileName =>
|
||||
ts.isAnySupportedFileExtension(fileName) ? this.getDiagnostics(fileName) : []);
|
||||
return ts.flatMap(this.languageServiceAdapterHost.getFilenames(), fileName => {
|
||||
if (!ts.isAnySupportedFileExtension(fileName)) {
|
||||
return [];
|
||||
}
|
||||
|
||||
const baseName = ts.getBaseFileName(fileName);
|
||||
if (baseName === "package.json" || baseName === "tsconfig.json" || baseName === "jsconfig.json") {
|
||||
return [];
|
||||
}
|
||||
return this.getDiagnostics(fileName);
|
||||
});
|
||||
}
|
||||
|
||||
public verifyErrorExistsAfterMarker(markerName: string, shouldExist: boolean, after: boolean) {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user