chore: enable no-unused vars (#2181)

This commit is contained in:
Himself65
2023-04-28 00:41:06 -05:00
committed by GitHub
parent b6ca2aa063
commit 70fbbb39c1
70 changed files with 206 additions and 225 deletions

View File

@@ -21,13 +21,13 @@ const mockedAddBlob = vi.fn();
vi.stubGlobal('window', {
apis: {
db: {
getDoc: async (id: string) => {
getDoc: async () => {
return Y.encodeStateAsUpdate(offlineYdoc);
},
applyDocUpdate: async (id: string, update: Uint8Array) => {
Y.applyUpdate(offlineYdoc, update, 'sqlite');
},
getPersistedBlobs: async (id: string) => {
getPersistedBlobs: async () => {
// todo: may need to hack the way to get hash keys of blobs
return [];
},
@@ -88,7 +88,7 @@ describe('SQLite provider', () => {
const bin = new Uint8Array([1, 2, 3]);
const blob = new Blob([bin]);
workspace.blobs.list = vi.fn(async () => ['blob1']);
workspace.blobs.get = vi.fn(async (key: string) => {
workspace.blobs.get = vi.fn(async () => {
return blob;
});

View File

@@ -131,16 +131,11 @@ type PageDetailProps<Flavour extends keyof WorkspaceRegistry> =
currentPageId: string;
};
type PageListProps<Flavour extends keyof WorkspaceRegistry> = {
type PageListProps<_Flavour extends keyof WorkspaceRegistry> = {
blockSuiteWorkspace: BlockSuiteWorkspace;
onOpenPage: (pageId: string, newTab?: boolean) => void;
};
type SideBarMenuProps<Flavour extends keyof WorkspaceRegistry> =
UIBaseProps<Flavour> & {
setSideBarOpen: (open: boolean) => void;
};
export interface WorkspaceUISchema<Flavour extends keyof WorkspaceRegistry> {
PageDetail: FC<PageDetailProps<Flavour>>;
PageList: FC<PageListProps<Flavour>>;