refactor: apply biome formatting to packages/features (#27844)

* refactor: apply biome formatting to packages/features (batch 1 - small subdirs)

Format small subdirectories in packages/features: di, flags, holidays, oauth,
settings, users, assignment-reason, selectedCalendar, hashedLink, host, form,
form-builder, availability, data-table, pbac, schedules, troubleshooter,
eventtypes, calendar-subscription, and root-level files.

Also includes straggler apps/web BookEventForm.tsx.

Co-Authored-By: Claude Opus 4.6 <[email protected]>

* refactor: apply biome formatting to packages/features (batch 2 - medium subdirs)

Format medium subdirectories in packages/features: auth, credentials,
calendars, routing-forms, routing-trace, attributes, watchlist, calAIPhone,
tasker, and webhooks.

Co-Authored-By: Claude Opus 4.6 <[email protected]>

* refactor: apply biome formatting to packages/features (batch 3 - bookings + insights)

Format bookings and insights subdirectories in packages/features.

Co-Authored-By: Claude Opus 4.6 <[email protected]>

* refactor: apply biome formatting to packages/features (batch 4 - ee)

Format packages/features/ee subdirectory covering billing, workflows,
organizations, teams, managed-event-types, round-robin, dsync,
integration-attribute-sync, and payments.

Co-Authored-By: Claude Opus 4.6 <[email protected]>

* refactor: apply biome formatting to packages/features (batch 5 - booking-audit part 1)

Format booking-audit di, actions, common, dto, repository, and types
subdirectories in packages/features/booking-audit.

Co-Authored-By: Claude Opus 4.6 <[email protected]>

* refactor: apply biome formatting to packages/features (batch 6 - booking-audit part 2)

Format booking-audit service subdirectory in packages/features/booking-audit.

Co-Authored-By: Claude Opus 4.6 <[email protected]>

---------

Co-authored-by: Claude Opus 4.6 <[email protected]>
This commit is contained in:
Eunjae LeeandClaude Opus 4.6 authored and GitHub committed 2026-02-11 15:47:14 +01:00
1 parent bc8ebb9213
commit 98b6d63164
310 files changed
+4309 -4585

No files matched your search

@@ -8,11 +8,7 @@ import { useIsPlatformBookerEmbed } from "@calcom/atoms/hooks/useIsPlatformBooke
import { useBookerStoreContext } from "@calcom/features/bookings/Booker/BookerStoreProvider";
import type { BookerEvent } from "@calcom/features/bookings/types";
import ServerTrans from "@calcom/lib/components/ServerTrans";
import {
APP_NAME,
WEBSITE_PRIVACY_POLICY_URL,
WEBSITE_TERMS_URL,
} from "@calcom/lib/constants";
import { APP_NAME, WEBSITE_PRIVACY_POLICY_URL, WEBSITE_TERMS_URL } from "@calcom/lib/constants";
import { ErrorCode } from "@calcom/lib/errorCodes";
import { useLocale } from "@calcom/lib/hooks/useLocale";
import type { TimeFormat } from "@calcom/lib/timeFormat";
@@ -24,10 +20,7 @@ import { Form } from "@calcom/ui/components/form";
import { formatEventFromTime } from "@calcom/features/bookings/Booker/utils/dates";
import { useBookerTime } from "@calcom/features/bookings/Booker/hooks/useBookerTime";
import type { UseBookingFormReturnType } from "@calcom/features/bookings/Booker/hooks/useBookingForm";
import type {
IUseBookingErrors,
IUseBookingLoadingStates,
} from "../../hooks/useBookings";
import type { IUseBookingErrors, IUseBookingLoadingStates } from "../../hooks/useBookings";
import { BookingFields } from "./BookingFields";
import { FormSkeleton } from "./Skeleton";
@@ -75,10 +68,7 @@ export const BookEventForm = ({
eventQuery: {
isError: boolean;
isPending: boolean;
data?: Pick<
BookerEvent,
"price" | "currency" | "metadata" | "bookingFields" | "locations"
> | null;
data?: Pick<BookerEvent, "price" | "currency" | "metadata" | "bookingFields" | "locations"> | null;
};
}) => {
const eventType = eventQuery.data;
@@ -86,9 +76,7 @@ export const BookEventForm = ({
const bookingData = useBookerStoreContext((state) => state.bookingData);
const rescheduleUid = useBookerStoreContext((state) => state.rescheduleUid);
const username = useBookerStoreContext((state) => state.username);
const isInstantMeeting = useBookerStoreContext(
(state) => state.isInstantMeeting
);
const isInstantMeeting = useBookerStoreContext((state) => state.isInstantMeeting);
const isPlatformBookerEmbed = useIsPlatformBookerEmbed();
const { timeFormat, timezone } = useBookerTime();
@@ -98,11 +86,7 @@ export const BookEventForm = ({
const isPaidEvent = useMemo(() => {
if (!eventType?.price) return false;
const paymentAppData = getPaymentAppData(eventType);
return (
eventType?.price > 0 &&
!Number.isNaN(paymentAppData.price) &&
paymentAppData.price > 0
);
return eventType?.price > 0 && !Number.isNaN(paymentAppData.price) && paymentAppData.price > 0;
}, [eventType]);
const paymentCurrency = useMemo(() => {
@@ -110,8 +94,7 @@ export const BookEventForm = ({
return getPaymentAppData(eventType)?.currency || "USD";
}, [eventType]);
if (eventQuery.isError)
return <Alert severity="warning" message={t("error_booking_event")} />;
if (eventQuery.isError) return <Alert severity="warning" message={t("error_booking_event")} />;
if (eventQuery.isPending || !eventQuery.data) return <FormSkeleton />;
if (!timeslot)
return (
@@ -144,8 +127,7 @@ export const BookEventForm = ({
}}
form={bookingForm}
handleSubmit={onSubmit}
noValidate
>
noValidate>
<BookingFields
isDynamicGroupBooking={!!(username && username.indexOf("+") > -1)}
fields={eventType.bookingFields}
@@ -187,8 +169,7 @@ export const BookEventForm = ({
key="please-select-a-new-time-button"
type="button"
className="underline"
onClick={onCancel}
>
onClick={onCancel}>
Please select a new time
</button>,
]}
@@ -209,16 +190,14 @@ export const BookEventForm = ({
className="text-emphasis hover:underline"
key="terms"
href={`${WEBSITE_TERMS_URL}`}
target="_blank"
>
target="_blank">
Terms
</Link>,
<Link
className="text-emphasis hover:underline"
key="privacy"
href={`${WEBSITE_PRIVACY_POLICY_URL}`}
target="_blank"
>
target="_blank">
Privacy Policy.
</Link>,
]}
@@ -233,8 +212,7 @@ export const BookEventForm = ({
className="text-emphasis hover:underline"
key="terms"
href={`${WEBSITE_TERMS_URL}`}
target="_blank"
>
target="_blank">
{t("terms")}
</Link>{" "}
{t("and")}{" "}
@@ -242,8 +220,7 @@ export const BookEventForm = ({
className="text-emphasis hover:underline"
key="privacy"
href={`${WEBSITE_PRIVACY_POLICY_URL}`}
target="_blank"
>
target="_blank">
{t("privacy_policy")}
</Link>
.
@@ -251,11 +228,7 @@ export const BookEventForm = ({
)}
<div className="flex justify-end mt-auto space-x-2 modalsticky rtl:space-x-reverse">
{isInstantMeeting ? (
<Button
type="submit"
color="primary"
loading={loadingStates.creatingInstantBooking}
>
<Button type="submit" color="primary" loading={loadingStates.creatingInstantBooking}>
{isPaidEvent ? t("pay_and_book") : t("confirm")}
</Button>
) : (
@@ -266,8 +239,7 @@ export const BookEventForm = ({
type="button"
onClick={onCancel}
data-testid="back"
className={classNames?.backButton}
>
className={classNames?.backButton}>
{t("back")}
</Button>
)}
@@ -276,9 +248,7 @@ export const BookEventForm = ({
type="submit"
color="primary"
disabled={
(!!shouldRenderCaptcha && !watchedCfToken) ||
isTimeslotUnavailable ||
confirmButtonDisabled
(!!shouldRenderCaptcha && !watchedCfToken) || isTimeslotUnavailable || confirmButtonDisabled
}
loading={
loadingStates.creatingBooking ||
@@ -287,11 +257,8 @@ export const BookEventForm = ({
}
className={classNames?.confirmButton}
data-testid={
rescheduleUid && bookingData
? "confirm-reschedule-button"
: "confirm-book-button"
}
>
rescheduleUid && bookingData ? "confirm-reschedule-button" : "confirm-book-button"
}>
{rescheduleUid && bookingData
? t("reschedule")
: renderConfirmNotVerifyEmailButtonCond
@@ -352,9 +319,7 @@ const getError = ({
}
const messageKey =
error.message === ErrorCode.BookerLimitExceeded
? "booker_upcoming_limit_reached"
: error.message;
error.message === ErrorCode.BookerLimitExceeded ? "booker_upcoming_limit_reached" : error.message;
return error?.message ? (
<>
@@ -362,9 +327,7 @@ const getError = ({
{error.data?.traceId && (
<div className="mt-2 text-xs text-subtle">
<span className="font-medium">{t("trace_reference_id")}:</span>
<code className="ml-1 font-mono break-all select-all">
{error.data.traceId}
</code>
<code className="ml-1 font-mono break-all select-all">{error.data.traceId}</code>
</div>
)}
</>