style: auto-fix lint and format

This commit is contained in:
ajnart authored and ajnart committed 2026-08-13 19:54:49 +02:00
1 parent 77cbd9f723
commit 19befee8a5
3 files changed
+7 -6

No files matched your search

@@ -53,8 +53,8 @@ export const WidgetInteractionGuide = ({ advancedView = true }: { advancedView?:
</div>
{advancedView && (
<p className="m-0 px-4 pb-4 text-xs text-[#696969] dark:text-[#999]">
Advanced view reuses the widget&apos;s live data and cache. The rest of the board stays visible but dimmed.
On touch devices, use the widget menu; compact-only widgets adapt in place instead.
Advanced view reuses the widget&apos;s live data and cache. The rest of the board stays visible but dimmed. On
touch devices, use the widget menu; compact-only widgets adapt in place instead.
</p>
)}
</details>
@@ -33,9 +33,7 @@ describe("matchesWidgetItemQuery", () => {
expect(
matches("customApi", ["widget", "customApi", "getData"], { ...input, definitionId: "definition-2" }, scope),
).toBe(false);
expect(matches("customApi", ["widget", "customApi", "getData"], { ...input, itemId: "item-2" }, scope)).toBe(
false,
);
expect(matches("customApi", ["widget", "customApi", "getData"], { ...input, itemId: "item-2" }, scope)).toBe(false);
expect(matches("customApi", ["widget", "customApi", "getData"], { ...input, boardId: "board-2" }, scope)).toBe(
false,
);
+4 -1
View File
@@ -9,7 +9,10 @@ interface LocalizedTimeOptions {
}
const toValidDate = (value: LocalizedDateValue): Date | undefined => {
const date = value instanceof Date ? value : new Date(typeof value === "string" && dateOnlyPattern.test(value) ? `${value}T00:00:00Z` : value);
const date =
value instanceof Date
? value
: new Date(typeof value === "string" && dateOnlyPattern.test(value) ? `${value}T00:00:00Z` : value);
return Number.isNaN(date.getTime()) ? undefined : date;
};