Chore: Housekeeping & Make ESLint Happy

This commit is contained in:
SukkaW
2024-09-29 11:01:16 +08:00
parent 8c655582ee
commit 14bcc10ce7
14 changed files with 294 additions and 333 deletions

View File

@@ -79,9 +79,7 @@ const priorityOrder: Record<'default' | string & {}, number> = {
LICENSE: 70,
default: Number.MAX_VALUE
};
const prioritySorter = (a: TreeType, b: TreeType) => {
return ((priorityOrder[a.name] || priorityOrder.default) - (priorityOrder[b.name] || priorityOrder.default)) || a.name.localeCompare(b.name);
};
const prioritySorter = (a: TreeType, b: TreeType) => ((priorityOrder[a.name] || priorityOrder.default) - (priorityOrder[b.name] || priorityOrder.default)) || a.name.localeCompare(b.name);
const html = (string: TemplateStringsArray, ...values: any[]) => string.reduce((acc, str, i) => acc + str + (values[i] ?? ''), '');