mirror of
https://github.com/home-assistant/frontend.git
synced 2025-11-06 09:29:40 +00:00
Add and fix stylistic eslint rules (#23735)
* Fix stylistic eslint rules * Fix eslint issues
This commit is contained in:
@@ -48,9 +48,10 @@ export interface SortingChangedEvent {
|
||||
|
||||
export type SortingDirection = "desc" | "asc" | null;
|
||||
|
||||
export interface DataTableColumnContainer<T = any> {
|
||||
[key: string]: DataTableColumnData<T>;
|
||||
}
|
||||
export type DataTableColumnContainer<T = any> = Record<
|
||||
string,
|
||||
DataTableColumnData<T>
|
||||
>;
|
||||
|
||||
export interface DataTableSortColumnData {
|
||||
sortable?: boolean;
|
||||
@@ -94,9 +95,7 @@ export interface DataTableRowData {
|
||||
selectable?: boolean;
|
||||
}
|
||||
|
||||
export interface SortableColumnContainer {
|
||||
[key: string]: ClonedDataTableColumnData;
|
||||
}
|
||||
export type SortableColumnContainer = Record<string, ClonedDataTableColumnData>;
|
||||
|
||||
const UNDEFINED_GROUP_KEY = "zzzzz_undefined";
|
||||
|
||||
@@ -694,9 +693,9 @@ export class HaDataTable extends LitElement {
|
||||
grouped[UNDEFINED_GROUP_KEY] = grouped.undefined;
|
||||
delete grouped.undefined;
|
||||
}
|
||||
const sorted: {
|
||||
[key: string]: DataTableRowData[];
|
||||
} = Object.keys(grouped)
|
||||
const sorted: Record<string, DataTableRowData[]> = Object.keys(
|
||||
grouped
|
||||
)
|
||||
.sort((a, b) => {
|
||||
const orderA = groupOrder?.indexOf(a) ?? -1;
|
||||
const orderB = groupOrder?.indexOf(b) ?? -1;
|
||||
|
||||
Reference in New Issue
Block a user