⚡ Project management that doesn't become the project. Boards, Gantt charts, and GitHub integration. Self-host it or use Kaneo Cloud.
TypeScript honoissue-managementissue-trackerjira-alternativekanbanlinear-alternativemcpproject-managementreactself-hostedtypescript
style: fix biome formatting for validate-dates files
Sunilb39f29b4409a
diff --git a/apps/api/src/utils/validate-dates.ts b/apps/api/src/utils/validate-dates.tsindex 5e387e330..4d297e23d 100644--- a/apps/api/src/utils/validate-dates.ts+++ b/apps/api/src/utils/validate-dates.ts@@ -4,10 +4,7 @@ import { HTTPException } from "hono/http-exception";* Validates and parses a date string. Throws an HTTPException if the string* cannot be parsed into a valid Date.*/-export function validateAndParseDate(- dateStr: string,- fieldName: string,-): Date {+export function validateAndParseDate(dateStr: string, fieldName: string): Date {const parsed = new Date(dateStr);if (Number.isNaN(parsed.getTime())) {throw new HTTPException(400, {diff --git a/tests/api/utils/validate-dates.test.ts b/tests/api/utils/validate-dates.test.tsindex 207d24d80..805f052a3 100644--- a/tests/api/utils/validate-dates.test.ts+++ b/tests/api/utils/validate-dates.test.ts@@ -18,21 +18,21 @@ describe("validateAndParseDate", () => {});it("should throw on an invalid date string", () => {- expect(() =>- validateAndParseDate("not-a-date", "dueDate"),- ).toThrowError(/Invalid dueDate/);+ expect(() => validateAndParseDate("not-a-date", "dueDate")).toThrowError(+ /Invalid dueDate/,+ );});it("should throw on an empty string", () => {- expect(() =>- validateAndParseDate("", "startDate"),- ).toThrowError(/Invalid startDate/);+ expect(() => validateAndParseDate("", "startDate")).toThrowError(+ /Invalid startDate/,+ );});it("should throw on a gibberish string", () => {- expect(() =>- validateAndParseDate("abc123xyz", "dueDate"),- ).toThrowError(/Invalid dueDate/);+ expect(() => validateAndParseDate("abc123xyz", "dueDate")).toThrowError(+ /Invalid dueDate/,+ );});});