Add rules from eslint's recommended set that triggered good lints (#50422)

This commit is contained in:
Jake Bailey
2022-09-19 16:20:55 -07:00
committed by GitHub
parent a11c41621b
commit 16156b1baf
34 changed files with 54 additions and 48 deletions

View File

@@ -940,7 +940,7 @@ namespace ts.server {
// raw is now fixed and ready
this.safelist = raw.typesMap;
for (const key in raw.simpleMap) {
if (raw.simpleMap.hasOwnProperty(key)) {
if (hasProperty(raw.simpleMap, key)) {
this.legacySafelist.set(key, raw.simpleMap[key].toLowerCase());
}
}

View File

@@ -297,7 +297,7 @@ namespace ts.server {
interface ProjectNavigateToItems {
project: Project;
navigateToItems: readonly NavigateToItem[];
};
}
function createDocumentSpanSet(): Set<DocumentSpan> {
return createSet(({textSpan}) => textSpan.start + 100003 * textSpan.length, documentSpansEqual);