From 4e493972e590b93cf3d40399cf70f42e6e1c3cbb Mon Sep 17 00:00:00 2001 From: "codegen-sh[bot]" <131295404+codegen-sh[bot]@users.noreply.github.com> Date: Mon, 18 Aug 2025 22:24:07 +0000 Subject: [PATCH] fix: fix remaining linting errors --- app/components/Collaborators.tsx | 2 +- app/components/LazyLoad.ts | 4 ++-- app/components/PaginatedList.test.tsx | 2 +- app/components/PaginatedList.tsx | 10 ++++++---- app/components/Toasts.tsx | 2 +- 5 files changed, 11 insertions(+), 9 deletions(-) diff --git a/app/components/Collaborators.tsx b/app/components/Collaborators.tsx index c8c2758e41..58dc9c52a5 100644 --- a/app/components/Collaborators.tsx +++ b/app/components/Collaborators.tsx @@ -125,8 +125,8 @@ function Collaborators(props: Props) { return ( > { +export interface LazyComponent> { Component: React.LazyExoticComponent; preload: () => Promise<{ default: T }>; } @@ -34,7 +34,7 @@ interface LazyLoadOptions { * MyComponent.preload(); * ``` */ -export function createLazyComponent>( +export function createLazyComponent>( factory: () => Promise<{ default: T }>, options: LazyLoadOptions = {} ): LazyComponent { diff --git a/app/components/PaginatedList.test.tsx b/app/components/PaginatedList.test.tsx index 1d89716ef7..2b88a2a2c2 100644 --- a/app/components/PaginatedList.test.tsx +++ b/app/components/PaginatedList.test.tsx @@ -14,7 +14,7 @@ describe("PaginatedList", () => { i18n, tReady: true, t: ((key: string) => key) as TFunction, - } as any; + } as unknown; it("with no items renders nothing", () => { const result = render( diff --git a/app/components/PaginatedList.tsx b/app/components/PaginatedList.tsx index 21906bb4de..13d390936a 100644 --- a/app/components/PaginatedList.tsx +++ b/app/components/PaginatedList.tsx @@ -34,11 +34,11 @@ interface Props * @param options Pagination and other query options */ fetch?: ( - options: Record | undefined + options: Record | undefined ) => Promise | undefined; /** Additional options to pass to the fetch function */ - options?: Record; + options?: Record; /** Optional header content to display above the list */ heading?: React.ReactNode; @@ -77,7 +77,9 @@ interface Props * Function to render section headings (typically date-based) * @param name The heading text or element to render */ - renderHeading?: (name: React.ReactElement | string) => React.ReactNode; + renderHeading?: ( + name: React.ReactElement | string + ) => React.ReactNode; /** * Handler for escape key press @@ -206,7 +208,7 @@ const PaginatedList = ({ if (fetch) { void fetchResults(); } - }, [fetch]); + }, [fetch, fetchResults]); // Handle updates to fetch or options React.useEffect(() => { diff --git a/app/components/Toasts.tsx b/app/components/Toasts.tsx index 6d47614611..ac4b6bcb57 100644 --- a/app/components/Toasts.tsx +++ b/app/components/Toasts.tsx @@ -9,7 +9,7 @@ function Toasts() { return (