chore: run linter and formatter

This commit is contained in:
Jacobtread 2026-05-17 20:31:17 +12:00
parent 194946b5c3
commit 1376f09368
No known key found for this signature in database
GPG key ID: AB9B37C42B33D9C6
7 changed files with 32 additions and 32 deletions

View file

@ -8,4 +8,4 @@
"authorUrl": "https://jacobtread.com",
"fundingUrl": "https://www.buymeacoffee.com/jacobtread",
"isDesktopOnly": false
}
}

View file

@ -1,2 +1,2 @@
patchedDependencies:
pdfmake: patches/pdfmake.patch
pdfmake: patches/pdfmake.patch

View file

@ -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);
});
});
}
/**

View file

@ -48,6 +48,6 @@ vi.mock("obsidian", () => {
Platform: MockPlatform,
FileView: MockFileView,
EditableFileView: MockEditableFileView,
requireApiVersion: mockRequireApiVersion
requireApiVersion: mockRequireApiVersion,
};
});

View file

@ -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",
});

View file

@ -46,11 +46,11 @@ export class TimekeepLocatorModal extends SuggestModal<TimekeepRunningEntry> {
}
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);
}
}

View file

@ -43,4 +43,4 @@
"2.1.1": "1.5.12",
"2.1.2": "1.5.12",
"2.1.3": "1.5.12"
}
}