Refactor: Remove unnecessary eslint-disable comments and improve code clarity in data grid components and hooks
quality / commitlint (push) Skipped
quality / changes (push) Successful in 5s
quality / api (push) Skipped
quality / docker-check (push) Skipped
CD / update-wiki (push) Successful in 3s
quality / web (push) Successful in 41s
CD / quality (push) Successful in 51s
CD / publish (push) Successful in 26s
quality / commitlint (push) Skipped
quality / changes (push) Successful in 5s
quality / api (push) Skipped
quality / docker-check (push) Skipped
CD / update-wiki (push) Successful in 3s
quality / web (push) Successful in 41s
CD / quality (push) Successful in 51s
CD / publish (push) Successful in 26s
This commit is contained in:
@@ -258,7 +258,6 @@ function DataGridColumnHeaderInner<TData, TValue>({
|
||||
}
|
||||
|
||||
return items
|
||||
// eslint-disable-next-line react-hooks/exhaustive-deps
|
||||
}, [
|
||||
filter,
|
||||
canSort,
|
||||
|
||||
@@ -464,10 +464,8 @@ function DataGridTableBase({ children }: { children: ReactNode }) {
|
||||
colSizes[`--col-${header.column.id}-size`] = header.column.getSize()
|
||||
}
|
||||
return colSizes
|
||||
// eslint-disable-next-line react-hooks/exhaustive-deps
|
||||
}, [
|
||||
props.tableLayout?.columnsResizable,
|
||||
// eslint-disable-next-line react-hooks/exhaustive-deps
|
||||
table.getState().columnSizing,
|
||||
])
|
||||
|
||||
|
||||
@@ -10,7 +10,6 @@ import {
|
||||
import { cn } from "@cdnmanager/ui/lib/utils"
|
||||
|
||||
declare module "@tanstack/react-table" {
|
||||
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
||||
interface ColumnMeta<TData extends RowData, TValue> {
|
||||
headerTitle?: string
|
||||
headerClassName?: string
|
||||
@@ -108,7 +107,6 @@ export interface DataGridProps<TData extends object> {
|
||||
}
|
||||
|
||||
const DataGridContext = createContext<
|
||||
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
||||
DataGridContextProps<any> | undefined
|
||||
>(undefined)
|
||||
|
||||
@@ -145,7 +143,6 @@ function DataGridProvider<TData extends object>({
|
||||
recordCount: props.recordCount,
|
||||
isLoading: props.isLoading || false,
|
||||
}),
|
||||
// eslint-disable-next-line react-hooks/exhaustive-deps
|
||||
[
|
||||
table,
|
||||
props.recordCount,
|
||||
@@ -157,9 +154,7 @@ function DataGridProvider<TData extends object>({
|
||||
props.emptyMessage,
|
||||
props.onRowClick,
|
||||
props.className,
|
||||
// eslint-disable-next-line react-hooks/exhaustive-deps
|
||||
JSON.stringify(props.tableLayout),
|
||||
// eslint-disable-next-line react-hooks/exhaustive-deps
|
||||
JSON.stringify(props.tableClassNames),
|
||||
tableState.sorting,
|
||||
tableState.pagination,
|
||||
|
||||
@@ -272,6 +272,7 @@ export const useFileUpload = (
|
||||
clearFiles,
|
||||
onFilesChange,
|
||||
onFilesAdded,
|
||||
onError,
|
||||
]
|
||||
)
|
||||
|
||||
|
||||
@@ -24,8 +24,9 @@ export function dedupeBreadcrumbs(crumbs: BreadcrumbCrumb[]): BreadcrumbCrumb[]
|
||||
|
||||
export function getBreadcrumbs(
|
||||
pathname: string,
|
||||
_dynamicLabels: Record<string, string> = {},
|
||||
dynamicLabels: Record<string, string> = {},
|
||||
): BreadcrumbCrumb[] {
|
||||
void dynamicLabels
|
||||
const path = pathname.replace(/\/+$/, '') || '/'
|
||||
|
||||
if (path === '/') {
|
||||
|
||||
Reference in New Issue
Block a user