From 8cfe07a9a55462da839646d8f3a4afa7ca08bd4c Mon Sep 17 00:00:00 2001 From: Navin Karkera Date: Wed, 18 Sep 2024 15:30:28 +0530 Subject: [PATCH] fix: lint issues --- src/library-authoring/collections/LibraryCollectionPage.tsx | 1 + src/library-authoring/common/context.tsx | 2 +- src/library-authoring/data/api.mocks.ts | 1 - src/library-authoring/data/api.ts | 2 -- 4 files changed, 2 insertions(+), 4 deletions(-) diff --git a/src/library-authoring/collections/LibraryCollectionPage.tsx b/src/library-authoring/collections/LibraryCollectionPage.tsx index 62945a88b1..3e09289d4b 100644 --- a/src/library-authoring/collections/LibraryCollectionPage.tsx +++ b/src/library-authoring/collections/LibraryCollectionPage.tsx @@ -94,6 +94,7 @@ const LibraryCollectionPage = () => { const { libraryId, collectionId } = useParams(); if (!collectionId || !libraryId) { + // istanbul ignore next - This shouldn't be possible; it's just here to satisfy the type checker. throw new Error('Rendered without collectionId or libraryId URL parameter'); } diff --git a/src/library-authoring/common/context.tsx b/src/library-authoring/common/context.tsx index b3811e6ddf..cd82a2d84a 100644 --- a/src/library-authoring/common/context.tsx +++ b/src/library-authoring/common/context.tsx @@ -30,7 +30,7 @@ export const LibraryContext = React.createContext({ isCreateCollectionModalOpen: false, openCreateCollectionModal: () => {}, closeCreateCollectionModal: () => {}, - openCollectionInfoSidebar: () => {}, // eslint-disable-line @typescript-eslint/no-unused-vars + openCollectionInfoSidebar: () => {}, } as LibraryContextData); /** diff --git a/src/library-authoring/data/api.mocks.ts b/src/library-authoring/data/api.mocks.ts index f0180e8221..f1cccbba30 100644 --- a/src/library-authoring/data/api.mocks.ts +++ b/src/library-authoring/data/api.mocks.ts @@ -259,7 +259,6 @@ mockCollection.collectionData = { key: mockCollection.collectionId, title: 'My first collection', description: 'A collection for testing', - entities: [], created: '2024-06-26T14:19:59Z', modified: '2024-07-20T17:36:51Z', enabled: true, diff --git a/src/library-authoring/data/api.ts b/src/library-authoring/data/api.ts index 335a2ac4a5..0ac62e556e 100644 --- a/src/library-authoring/data/api.ts +++ b/src/library-authoring/data/api.ts @@ -88,8 +88,6 @@ export interface Collection { createdBy: string | null; created: string; modified: string; - // TODO: Update the type below once entities are properly linked - entities: Array; learningPackage: number; }