mirror of
https://github.com/microsoft/vscode.git
synced 2026-04-27 03:54:24 +01:00
extension linter: refactor: rewrite package.json linting with a for-loop
This commit is contained in:
@@ -115,10 +115,10 @@ export class ExtensionLinter {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private lintPackageJson() {
|
private lintPackageJson() {
|
||||||
this.packageJsonQ.forEach(document => {
|
for (const document of Array.from(this.packageJsonQ)) {
|
||||||
this.packageJsonQ.delete(document);
|
this.packageJsonQ.delete(document);
|
||||||
if (document.isClosed) {
|
if (document.isClosed) {
|
||||||
return;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
const diagnostics: Diagnostic[] = [];
|
const diagnostics: Diagnostic[] = [];
|
||||||
@@ -192,7 +192,7 @@ export class ExtensionLinter {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
this.diagnosticsCollection.set(document.uri, diagnostics);
|
this.diagnosticsCollection.set(document.uri, diagnostics);
|
||||||
});
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private async lintReadme() {
|
private async lintReadme() {
|
||||||
|
|||||||
Reference in New Issue
Block a user