From 1376f093686be93d11abeb3f5c0ff7a1ab99b656 Mon Sep 17 00:00:00 2001 From: Jacobtread Date: Sun, 17 May 2026 20:31:17 +1200 Subject: [PATCH] chore: run linter and formatter --- manifest.json | 2 +- pnpm-workspace.yaml | 2 +- src/__mocks__/obsidian.ts | 50 +++++++++---------- src/__mocks__/setupObsidianMocks.ts | 2 +- .../TimesheetExportActions.ts | 2 +- src/modals/TimekeepLocatorModal.ts | 4 +- versions.json | 2 +- 7 files changed, 32 insertions(+), 32 deletions(-) diff --git a/manifest.json b/manifest.json index df22012..cbfe156 100644 --- a/manifest.json +++ b/manifest.json @@ -8,4 +8,4 @@ "authorUrl": "https://jacobtread.com", "fundingUrl": "https://www.buymeacoffee.com/jacobtread", "isDesktopOnly": false -} \ No newline at end of file +} diff --git a/pnpm-workspace.yaml b/pnpm-workspace.yaml index f3849d8..fc0c8fe 100644 --- a/pnpm-workspace.yaml +++ b/pnpm-workspace.yaml @@ -1,2 +1,2 @@ patchedDependencies: - pdfmake: patches/pdfmake.patch + pdfmake: patches/pdfmake.patch diff --git a/src/__mocks__/obsidian.ts b/src/__mocks__/obsidian.ts index 53516ea..d1de881 100644 --- a/src/__mocks__/obsidian.ts +++ b/src/__mocks__/obsidian.ts @@ -624,46 +624,46 @@ export function setObsidianMockElementHelpers(node: Node) { classes .flat(Infinity) - .filter((c): c is string => typeof c === 'string') - .flatMap(c => c.split(' ')) + .filter((c): c is string => typeof c === "string") + .flatMap((c) => c.split(" ")) .filter(Boolean) - .forEach(c => classList.add(c)); + .forEach((c) => classList.add(c)); }); (node as Element).addClasses = vi.fn().mockImplementation((classes: string[]) => { - (node as Element).addClass(...classes); + (node as Element).addClass(...classes); }); (node as Element).removeClass = vi.fn().mockImplementation((...classes: any[]) => { - const classList = (node as Element).classList; + const classList = (node as Element).classList; - classes - .flat(Infinity) - .filter((c): c is string => typeof c === 'string') - .flatMap(c => c.split(' ')) - .filter(Boolean) - .forEach(c => classList.remove(c)); + classes + .flat(Infinity) + .filter((c): c is string => typeof c === "string") + .flatMap((c) => c.split(" ")) + .filter(Boolean) + .forEach((c) => classList.remove(c)); }); (node as Element).removeClasses = vi.fn().mockImplementation((classes: string[]) => { - (node as Element).removeClass(...classes); + (node as Element).removeClass(...classes); }); - (node as Element).toggleClass = vi.fn().mockImplementation( - (classes: string | string[], value: boolean) => { - const classList = (node as Element).classList; + (node as Element).toggleClass = vi + .fn() + .mockImplementation((classes: string | string[], value: boolean) => { + const classList = (node as Element).classList; - const normalized = [classes] - .flat(Infinity) - .filter((c): c is string => typeof c === 'string') - .flatMap(c => c.split(' ')) - .filter(Boolean); + const normalized = [classes] + .flat(Infinity) + .filter((c): c is string => typeof c === "string") + .flatMap((c) => c.split(" ")) + .filter(Boolean); - normalized.forEach(c => { - classList.toggle(c, value); - }); - } - ); + normalized.forEach((c) => { + classList.toggle(c, value); + }); + }); } /** diff --git a/src/__mocks__/setupObsidianMocks.ts b/src/__mocks__/setupObsidianMocks.ts index ab6814f..e65638c 100644 --- a/src/__mocks__/setupObsidianMocks.ts +++ b/src/__mocks__/setupObsidianMocks.ts @@ -48,6 +48,6 @@ vi.mock("obsidian", () => { Platform: MockPlatform, FileView: MockFileView, EditableFileView: MockEditableFileView, - requireApiVersion: mockRequireApiVersion + requireApiVersion: mockRequireApiVersion, }; }); diff --git a/src/components/TimesheetExportActions/TimesheetExportActions.ts b/src/components/TimesheetExportActions/TimesheetExportActions.ts index b51f0b5..65e52b2 100644 --- a/src/components/TimesheetExportActions/TimesheetExportActions.ts +++ b/src/components/TimesheetExportActions/TimesheetExportActions.ts @@ -47,7 +47,7 @@ export class TimesheetExportActions extends DomComponent { onload(): void { super.onload(); - const actionsEl = this.containerEl.createDiv( { + const actionsEl = this.containerEl.createDiv({ cls: "timekeep-actions", }); diff --git a/src/modals/TimekeepLocatorModal.ts b/src/modals/TimekeepLocatorModal.ts index 4ff543c..d18d250 100644 --- a/src/modals/TimekeepLocatorModal.ts +++ b/src/modals/TimekeepLocatorModal.ts @@ -46,11 +46,11 @@ export class TimekeepLocatorModal extends SuggestModal { } renderSuggestion(value: TimekeepRunningEntry, el: HTMLElement) { - el.createDiv( { text: value.running.name }); + el.createDiv({ text: value.running.name }); el.createEl("small", { text: value.ref.file.path }); } - onChooseSuggestion(item: TimekeepRunningEntry, _evt: MouseEvent | KeyboardEvent) { + onChooseSuggestion(item: TimekeepRunningEntry, _evt: MouseEvent | KeyboardEvent) { void TimekeepRegistry.openItemRef(this.app.workspace, item.ref); } } diff --git a/versions.json b/versions.json index 2a4358e..ab266ae 100644 --- a/versions.json +++ b/versions.json @@ -43,4 +43,4 @@ "2.1.1": "1.5.12", "2.1.2": "1.5.12", "2.1.3": "1.5.12" -} \ No newline at end of file +}