refactor: apply biome formatting to apps/web (#27692)

* refactor: apply biome formatting to apps/web (batch 1)

Formats apps/web non-modules directories:
- apps/web/app
- apps/web/lib
- apps/web/pages
- apps/web/styles
- apps/web/server
- apps/web/test
- Root-level .ts and .mjs files

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

* refactor: apply biome formatting to apps/web/modules (batch 2)

Formats smaller apps/web/modules directories:
- onboarding, data-table, users, apps, auth
- integration-attribute-sync, shell, availability
- feature-flags, team, webhooks, getting-started
- feature-opt-in, troubleshooter, schedules, notifications
- signup-view.tsx

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

* refactor: apply biome formatting to apps/web/modules (batch 3)

Formats medium apps/web/modules directories:
- bookings
- event-types
- insights
- embed

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

* refactor: apply biome formatting to apps/web/modules/ee (batch 4)

Formats apps/web/modules/ee directory.

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

* refactor: apply biome formatting to apps/web (batch 5)

Formats remaining apps/web directories:
- apps/web/modules/settings
- apps/web/modules/booking-audit
- apps/web/playwright

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

* refactor: apply biome formatting to apps/web/components (batch 6)

Formats remaining apps/web/components files.

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

* refactor: apply biome formatting to new apps/web files from main

Formats newly added/modified files from main merge:
- WorkflowStepContainer.tsx (resolved merge conflicts)
- Newly moved files (blocklist, form-builder, schedules, etc.)
- Other files modified in main

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

* refactor: apply biome formatting to new apps/web files from main

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

---------

Co-authored-by: Claude Opus 4.5 <[email protected]>
Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
This commit is contained in:
authored and GitHub committed 2026-02-10 23:25:24 +05:30
1 parent f4abbb2de1
commit 81e4241f85
271 files changed
+3729 -4857

No files matched your search

@@ -2,7 +2,10 @@ import { useLocale } from "@calcom/lib/hooks/useLocale";
import { trpc } from "@calcom/trpc/react";
import { showToast } from "@calcom/ui/components/toast";
import type { IntegrationAttributeSync, ISyncFormData } from "@calcom/features/ee/integration-attribute-sync/repositories/IIntegrationAttributeSyncRepository";
import type {
IntegrationAttributeSync,
ISyncFormData,
} from "@calcom/features/ee/integration-attribute-sync/repositories/IIntegrationAttributeSyncRepository";
import IntegrationAttributeSyncCard from "./IntegrationAttributeSyncCard";
import type { IIntegrationAttributeSyncCardProps } from "./IntegrationAttributeSyncCard";
@@ -173,9 +173,7 @@ export const FieldMappingBuilder = ({
attributeOptions={attributeOptions}
isLoading={isLoadingAttributes}
error={
duplicateIndices.has(index)
? t("attribute_sync_duplicate_attribute_mapping")
: undefined
duplicateIndices.has(index) ? t("attribute_sync_duplicate_attribute_mapping") : undefined
}
/>
))
@@ -40,9 +40,7 @@ export interface IIntegrationAttributeSyncCardProps {
onDelete?: () => void;
}
const IntegrationAttributeSyncCard = (
props: IIntegrationAttributeSyncCardProps
) => {
const IntegrationAttributeSyncCard = (props: IIntegrationAttributeSyncCardProps) => {
const {
sync,
credentialOptions,
@@ -74,9 +72,7 @@ const IntegrationAttributeSyncCard = (
operator: RuleOperatorEnum.AND,
conditions: [],
},
syncFieldMappings: Array.isArray(sync.syncFieldMappings)
? sync.syncFieldMappings
: [],
syncFieldMappings: Array.isArray(sync.syncFieldMappings) ? sync.syncFieldMappings : [],
}
: {
id: "",
@@ -104,9 +100,7 @@ const IntegrationAttributeSyncCard = (
operator: RuleOperatorEnum.AND,
conditions: [],
},
syncFieldMappings: Array.isArray(sync.syncFieldMappings)
? sync.syncFieldMappings
: [],
syncFieldMappings: Array.isArray(sync.syncFieldMappings) ? sync.syncFieldMappings : [],
});
}
// Only need to run if the sync changes
@@ -161,8 +155,7 @@ const IntegrationAttributeSyncCard = (
fn: handleDelete,
}
: undefined
}
>
}>
<FormCardBody>
<div className="space-y-4">
<div className="bg-default border-subtle rounded-2xl border p-2">
@@ -192,26 +185,16 @@ const IntegrationAttributeSyncCard = (
<SelectField
placeholder={t("attribute_sync_select_credential")}
options={credentialOptions}
value={
credentialOptions.find(
(opt) => Number(opt.value) === field.value
) || null
}
onChange={(option) =>
field.onChange(Number(option?.value))
}
value={credentialOptions.find((opt) => Number(opt.value) === field.value) || null}
onChange={(option) => field.onChange(Number(option?.value))}
/>
{fieldState.error && (
<p className="mt-1 text-xs text-red-600">
{fieldState.error.message}
</p>
<p className="mt-1 text-xs text-red-600">{fieldState.error.message}</p>
)}
</>
)}
/>
<p className="text-subtle mt-1 text-xs">
{t("attribute_sync_credential_description")}
</p>
<p className="text-subtle mt-1 text-xs">{t("attribute_sync_credential_description")}</p>
</div>
</div>
@@ -247,16 +230,10 @@ const IntegrationAttributeSyncCard = (
validate: (mappings) => {
const seenAttributes = new Set<string>();
for (const mapping of mappings || []) {
if (
mapping.attributeId &&
seenAttributes.has(mapping.attributeId)
) {
return t(
"attribute_sync_duplicate_attribute_mapping"
);
if (mapping.attributeId && seenAttributes.has(mapping.attributeId)) {
return t("attribute_sync_duplicate_attribute_mapping");
}
if (mapping.attributeId)
seenAttributes.add(mapping.attributeId);
if (mapping.attributeId) seenAttributes.add(mapping.attributeId);
}
return true;
},
@@ -264,16 +241,12 @@ const IntegrationAttributeSyncCard = (
render={({ field }) => (
<FieldMappingBuilder
value={{ mappings: field.value || [] }}
onChange={(fieldMappings) =>
field.onChange(fieldMappings.mappings)
}
onChange={(fieldMappings) => field.onChange(fieldMappings.mappings)}
attributeOptions={attributeOptions}
/>
)}
/>
<p className="text-subtle mt-1 text-xs">
{t("attribute_sync_field_mappings_description")}
</p>
<p className="text-subtle mt-1 text-xs">{t("attribute_sync_field_mappings_description")}</p>
</div>
<div className="border-subtle flex justify-end gap-2 border-t pt-4">
@@ -282,11 +255,7 @@ const IntegrationAttributeSyncCard = (
{t("cancel")}
</Button>
)}
<Button
type="submit"
loading={isPending}
disabled={!form.formState.isDirty}
>
<Button type="submit" loading={isPending} disabled={!form.formState.isDirty}>
{isCreateMode ? t("create") : t("save")}
</Button>
</div>
@@ -300,8 +269,7 @@ const IntegrationAttributeSyncCard = (
variety="danger"
title={t("attribute_sync_delete_title")}
confirmBtnText={t("delete")}
onConfirm={confirmDelete}
>
onConfirm={confirmDelete}>
{t("attribute_sync_delete_confirmation")}
</ConfirmationDialogContent>
</Dialog>
@@ -64,7 +64,9 @@ const ConditionComponent = ({
}: ConditionComponentProps) => {
const { t } = useLocale();
const conditionTypeOptions = getConditionTypeOptions(t);
const conditionTypeOption = conditionTypeOptions.find((opt: { value: ConditionIdentifierEnum; label: string }) => opt.value === condition.identifier);
const conditionTypeOption = conditionTypeOptions.find(
(opt: { value: ConditionIdentifierEnum; label: string }) => opt.value === condition.identifier
);
const handleTypeChange = (newType: { value: ConditionIdentifierEnum; label: string } | null) => {
if (!newType) return;
@@ -127,7 +129,9 @@ interface TeamConditionFieldsProps {
const TeamConditionFields = ({ condition, onChange, teamOptions, isLoading }: TeamConditionFieldsProps) => {
const { t } = useLocale();
const teamOperatorOptions = getTeamOperatorOptions(t);
const operatorOption = teamOperatorOptions.find((opt: { value: ConditionOperatorEnum; label: string }) => opt.value === condition.operator);
const operatorOption = teamOperatorOptions.find(
(opt: { value: ConditionOperatorEnum; label: string }) => opt.value === condition.operator
);
const isMulti = isArrayOperator(condition.operator);
const selectedTeams = isMulti
@@ -222,7 +226,9 @@ const AttributeConditionFields = ({
? getOperatorOptionsForAttributeType(selectedAttribute.type, t)
: [];
const operatorOption = operatorOptions.find((opt: { value: ConditionOperatorEnum; label: string }) => opt.value === condition.operator);
const operatorOption = operatorOptions.find(
(opt: { value: ConditionOperatorEnum; label: string }) => opt.value === condition.operator
);
const handleAttributeChange = (selected: { value: string; label: string } | null) => {
if (!selected) return;
@@ -309,7 +315,9 @@ const AttributeConditionFields = ({
}));
const selectedValues = isMulti
? valueOptions.filter((opt: { value: string; label: string }) => condition.value.includes(opt.value))
? valueOptions.filter((opt: { value: string; label: string }) =>
condition.value.includes(opt.value)
)
: valueOptions.find((opt: { value: string; label: string }) => condition.value[0] === opt.value);
return (
@@ -402,7 +410,9 @@ export const RuleBuilder = ({
}: RuleBuilderProps) => {
const { t } = useLocale();
const parentOperatorOptions = getParentOperatorOptions(t);
const parentOperatorOption = parentOperatorOptions.find((opt: { value: RuleOperatorEnum; label: string }) => opt.value === value.operator);
const parentOperatorOption = parentOperatorOptions.find(
(opt: { value: RuleOperatorEnum; label: string }) => opt.value === value.operator
);
const isLoading = isLoadingTeams || isLoadingAttributes;
const handleOperatorChange = (newOperator: { value: RuleOperatorEnum; label: string } | null) => {
@@ -442,7 +452,9 @@ export const RuleBuilder = ({
<div className="border-subtle rounded-lg border p-1">
<Icon name="filter" className="text-subtle h-4 w-4" />
</div>
<span className="text-emphasis ml-2 text-sm font-medium">{t("attribute_sync_user_filter_rules")}</span>
<span className="text-emphasis ml-2 text-sm font-medium">
{t("attribute_sync_user_filter_rules")}
</span>
</div>
<div className="mt-2 flex flex-wrap items-center gap-2 px-2">
@@ -460,9 +472,7 @@ export const RuleBuilder = ({
<div className="bg-muted mt-2 space-y-2 rounded-xl p-2">
{value.conditions.length === 0 ? (
<div className="text-subtle py-6 text-center text-sm">
{t("attribute_sync_no_conditions")}
</div>
<div className="text-subtle py-6 text-center text-sm">{t("attribute_sync_no_conditions")}</div>
) : (
value.conditions.map((condition: TAttributeSyncRuleCondition, index: number) => {
const conditionWithId = ensureConditionHasId(condition);