temp fixes for TS lint (#2352)

This commit is contained in:
Bruce Martin
2021-07-29 18:31:38 -07:00
committed by GitHub
parent 8136387127
commit 0e7daea737
6 changed files with 21 additions and 6 deletions
+3
View File
@@ -18,11 +18,13 @@ function caseInsensitiveCompare(a: any, b: any) {
return textA < textB ? -1 : textA > textB ? 1 : 0;
}
// eslint-disable-next-line @typescript-eslint/no-explicit-any --- FIXME: disabled temporarily on migrate to TS.
const catLabelSort = (isUserAnno: boolean, values: any[]): any[] => {
/* this sort could be memoized for perf */
const strings: string[] = [];
const ints: number[] = [];
// eslint-disable-next-line @typescript-eslint/no-explicit-any --- FIXME: disabled temporarily on migrate to TS.
const unassignedOrNaN: any = [];
// eslint-disable-next-line @typescript-eslint/no-explicit-any --- FIXME: disabled temporarily on migrate to TS.
@@ -42,6 +44,7 @@ const catLabelSort = (isUserAnno: boolean, values: any[]): any[] => {
ints.sort((a, b) => +a - +b);
unassignedOrNaN.sort(caseInsensitiveCompare);
// eslint-disable-next-line @typescript-eslint/no-explicit-any --- FIXME: disabled temporarily on migrate to TS.
return (<any>ints).concat(strings, unassignedOrNaN);
};