Skip to content

Commit 12914ea

Browse files
author
Andy Hanson
committed
Fix lint errors
1 parent fe970ab commit 12914ea

File tree

1 file changed

+15
-10
lines changed

1 file changed

+15
-10
lines changed

src/harness/fourslash.ts

Lines changed: 15 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1963,38 +1963,43 @@ namespace FourSlash {
19631963
let items = this.languageService.getNavigationBarItems(this.activeFile.fileName);
19641964
items = this.simplifyNavigationBar(items);
19651965
if (JSON.stringify(items) !== JSON.stringify(json)) {
1966-
this.raiseError(`verifyNavigationBar failed - expected: ${JSON.stringify(json, undefined, 2)}, got: ${JSON.stringify(items, undefined, 2)}`)
1966+
this.raiseError(`verifyNavigationBar failed - expected: ${JSON.stringify(json, undefined, 2)}, got: ${JSON.stringify(items, undefined, 2)}`);
19671967
}
19681968
}
19691969

19701970
// Remove any properties that tend to all have the same value so that test data is easier to read.
19711971
private simplifyNavigationBar(items: ts.NavigationBarItem[]): any {
19721972
return items.map(item => {
19731973
item = ts.clone(item);
1974-
if (item.kindModifiers === "")
1974+
if (item.kindModifiers === "") {
19751975
delete item.kindModifiers;
1976+
}
1977+
// We won't check this.
19761978
delete item.spans;
19771979
item.childItems = item.childItems.map(child => {
19781980
child = ts.clone(child);
1981+
delete child.spans;
19791982
ts.Debug.assert(child.childItems.length === 0);
1980-
ts.Debug.assert(child.indent === 0);
1981-
ts.Debug.assert(child.bolded === false);
1982-
ts.Debug.assert(child.grayed === false);
19831983
delete child.childItems;
1984+
ts.Debug.assert(child.indent === 0);
19841985
delete child.indent;
1986+
ts.Debug.assert(child.bolded === false);
19851987
delete child.bolded;
1988+
ts.Debug.assert(child.grayed === false);
19861989
delete child.grayed;
1987-
delete child.spans;
1988-
if (child.kindModifiers === "")
1990+
if (child.kindModifiers === "") {
19891991
delete child.kindModifiers;
1992+
}
19901993
return child;
19911994
});
1992-
if (item.bolded === false)
1995+
if (item.bolded === false) {
19931996
delete item.bolded;
1994-
if (item.grayed === false)
1997+
}
1998+
if (item.grayed === false) {
19951999
delete item.grayed;
2000+
}
19962001
return item;
1997-
})
2002+
});
19982003
}
19992004

20002005
public printNavigationItems(searchValue: string) {

0 commit comments

Comments
 (0)