chore: update biome schema version and refactor code style

- Updated biome schema version from 2.3.1 to 2.3.11 in biome.json.
- Refactored package.json for better readability and updated dependencies.
- Adjusted class names in InformationBubble, ChatAttachments, ChatBubble, FileUpload, Loading, and other components for consistent styling.
- Changed height classes from fixed pixel values to relative values for better responsiveness.
- Removed unnecessary comments and unused variables in user.controller.ts.
This commit is contained in:
Marco Pedone 2026-01-14 14:21:57 +01:00
parent f7831d6b57
commit 539f4dc4f8
14 changed files with 182 additions and 183 deletions

View file

@ -1,5 +1,5 @@
{
"$schema": "https://biomejs.dev/schemas/2.3.1/schema.json",
"$schema": "https://biomejs.dev/schemas/2.3.11/schema.json",
"assist": {
"actions": {
"source": {
@ -9,7 +9,6 @@
},
"enabled": true
},
"files": {
"ignoreUnknown": true,
"includes": [
@ -84,7 +83,6 @@
"complexity": {
"noUselessFragments": "off"
},
"correctness": {
"noUndeclaredVariables": "on",
"useExhaustiveDependencies": "off",
@ -124,7 +122,10 @@
}
}
},
"plugins": ["biome_plugins/missing.grit", "biome_plugins/null.grit"],
"plugins": [
"biome_plugins/missing.grit",
"biome_plugins/null.grit"
],
"vcs": {
"clientKind": "git",
"enabled": true,

View file

@ -54,7 +54,7 @@ const InformationBubble = ({
<HybridTooltip>
<HybridTooltipTrigger
className={cn(
`-top-2 -right-2 absolute flex size-6 items-center justify-center rounded-full bg-white`,
`absolute -top-2 -right-2 flex size-6 items-center justify-center rounded-full bg-white`,
className,
)}
>

View file

@ -51,7 +51,7 @@ export const ChatAttachments = ({
variant="ghost"
>
{attachments && attachments.length > 0 && (
<span className="-top-1 absolute right-0 rounded-full bg-blue-500 px-1 font-bold text-white text-xs">
<span className="absolute -top-1 right-0 rounded-full bg-blue-500 px-1 font-bold text-white text-xs">
{attachments.length}
</span>
)}
@ -71,7 +71,7 @@ export const ChatAttachments = ({
userId={chatUserData.id}
/>
<div className="h-auto max-h-[40rem] max-w-lg overflow-auto rounded-lg">
<div className="h-auto max-h-160 max-w-lg overflow-auto rounded-lg">
{attachmentsLoading ? (
<LoadingPage />
) : (
@ -137,7 +137,7 @@ export const ChatAttachments = ({
>
<Paperclip /> {t.allegati.i_tuoi_allegati}
{attachments && attachments.length > 0 && (
<span className="-top-1 -right-1 absolute flex size-5 items-center justify-center rounded-full bg-red-600 text-white text-xs">
<span className="absolute -top-1 -right-1 flex size-5 items-center justify-center rounded-full bg-red-600 text-white text-xs">
{attachments.length}
</span>
)}

View file

@ -100,7 +100,7 @@ const ChatBubbleMessage = React.forwardRef<
<div
className={cn(
chatBubbleMessageVariants({ className, layout, variant }),
"max-w-full whitespace-pre-wrap break-words",
"wrap-break-word max-w-full whitespace-pre-wrap",
)}
ref={ref}
{...props}
@ -173,7 +173,7 @@ const ChatBubbleActionWrapper = React.forwardRef<
{show && (
<div
className={cn(
"-translate-y-1/2 absolute top-1/2 flex opacity-0 transition-opacity duration-200 group-hover:opacity-100",
"absolute top-1/2 flex -translate-y-1/2 opacity-0 transition-opacity duration-200 group-hover:opacity-100",
variant === "sent"
? "-left-1 -translate-x-full flex-row-reverse"
: "-right-1 translate-x-full",

View file

@ -817,7 +817,7 @@ function FileUploadDropzone(props: FileUploadDropzoneProps) {
tabIndex={context.disabled ? undefined : 0}
{...dropzoneProps}
className={cn(
"relative flex select-none flex-col items-center justify-center gap-2 rounded-lg border-2 border-dashed p-6 outline-none transition-colors hover:bg-accent/30 focus-visible:border-ring/50 data-[disabled]:pointer-events-none data-[dragging]:border-primary/30 data-[invalid]:border-destructive data-[dragging]:bg-accent/30 data-[invalid]:ring-destructive/20",
"relative flex select-none flex-col items-center justify-center gap-2 rounded-lg border-2 border-dashed p-6 outline-none transition-colors hover:bg-accent/30 focus-visible:border-ring/50 data-disabled:pointer-events-none data-dragging:border-primary/30 data-invalid:border-destructive data-dragging:bg-accent/30 data-invalid:ring-destructive/20",
className,
)}
onClick={onClick}
@ -1231,12 +1231,12 @@ function FileUploadItemProgress(props: FileUploadItemProgressProps) {
role="progressbar"
{...progressProps}
className={cn(
"-translate-x-1/2 -translate-y-1/2 absolute top-1/2 left-1/2",
"absolute top-1/2 left-1/2 -translate-x-1/2 -translate-y-1/2",
className,
)}
>
<svg
className="rotate-[-90deg] transform"
className="-rotate-90 transform"
fill="none"
height={size}
stroke="currentColor"

View file

@ -5,7 +5,7 @@ export const LoadingPage = () => {
return (
<div className="flex h-full max-h-full w-full animate-pulse items-center justify-center py-20">
<div className="relative flex size-40 animate-spin items-center justify-center rounded-full border-8 border-muted-foreground border-t-red-400 text-4xl text-red-400"></div>
<ASvg className="-translate-y-2 absolute size-24" />
<ASvg className="absolute size-24 -translate-y-2" />
</div>
);
};

View file

@ -293,7 +293,7 @@ const AddAnnuncio = ({
</Button>
</DialogTrigger>
<DialogContent
className="sm:max-w-[425px]"
className="sm:max-w-106.25"
onInteractOutside={(e) => {
if (selectedAnnunci.length !== 0) {
e.preventDefault(); // Prevent closing the dialog if there are selected announcements
@ -559,7 +559,6 @@ const EditServizioAdmin = () => {
</CollapsibleTrigger>
<CollapsibleContent>
{(() => {
// biome-ignore lint/correctness/noUnusedVariables: <need to extract>
const { annunci, ...rest } = servizio;
return <pre>{JSON.stringify(rest, null, 2)}</pre>;
})()}

View file

@ -183,8 +183,8 @@ function CarouselPrevious({
className={cn(
"absolute size-8 rounded-full",
orientation === "horizontal"
? "-left-12 -translate-y-1/2 top-1/2"
: "-top-12 -translate-x-1/2 left-1/2 rotate-90",
? "top-1/2 -left-12 -translate-y-1/2"
: "-top-12 left-1/2 -translate-x-1/2 rotate-90",
className,
)}
data-slot="carousel-previous"
@ -213,8 +213,8 @@ function CarouselNext({
className={cn(
"absolute size-8 rounded-full",
orientation === "horizontal"
? "-right-12 -translate-y-1/2 top-1/2"
: "-bottom-12 -translate-x-1/2 left-1/2 rotate-90",
? "top-1/2 -right-12 -translate-y-1/2"
: "-bottom-12 left-1/2 -translate-x-1/2 rotate-90",
className,
)}
data-slot="carousel-next"

View file

@ -35,7 +35,7 @@ function SelectTrigger({
return (
<SelectPrimitive.Trigger
className={cn(
"flex w-fit items-center justify-between gap-2 whitespace-nowrap rounded-md border border-input bg-transparent px-3 py-2 text-sm shadow-xs outline-hidden transition-[color,box-shadow] focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-destructive/20 data-[size=default]:h-9 data-[size=sm]:h-8 data-[placeholder]:text-muted-foreground *:data-[slot=select-value]:line-clamp-1 *:data-[slot=select-value]:flex *:data-[slot=select-value]:items-center *:data-[slot=select-value]:gap-2 dark:bg-input/30 dark:aria-invalid:ring-destructive/40 dark:hover:bg-input/50 [&_svg:not([class*='size-'])]:size-4 [&_svg:not([class*='text-'])]:text-muted-foreground [&_svg]:pointer-events-none [&_svg]:shrink-0",
"flex w-fit items-center justify-between gap-2 whitespace-nowrap rounded-md border border-input bg-transparent px-3 py-2 text-sm shadow-xs outline-hidden transition-[color,box-shadow] focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-destructive/20 data-[size=default]:h-9 data-[size=sm]:h-8 data-placeholder:text-muted-foreground *:data-[slot=select-value]:line-clamp-1 *:data-[slot=select-value]:flex *:data-[slot=select-value]:items-center *:data-[slot=select-value]:gap-2 dark:bg-input/30 dark:aria-invalid:ring-destructive/40 dark:hover:bg-input/50 [&_svg:not([class*='size-'])]:size-4 [&_svg:not([class*='text-'])]:text-muted-foreground [&_svg]:pointer-events-none [&_svg]:shrink-0",
className,
)}
data-size={size}
@ -60,9 +60,9 @@ function SelectContent({
<SelectPrimitive.Portal>
<SelectPrimitive.Content
className={cn(
"data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 relative z-50 max-h-(--radix-select-content-available-height) min-w-[8rem] origin-(--radix-select-content-transform-origin) overflow-y-auto overflow-x-hidden rounded-md border bg-popover text-popover-foreground shadow-md data-[state=closed]:animate-out data-[state=open]:animate-in",
"data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 relative z-50 max-h-(--radix-select-content-available-height) min-w-32 origin-(--radix-select-content-transform-origin) overflow-y-auto overflow-x-hidden rounded-md border bg-popover text-popover-foreground shadow-md data-[state=closed]:animate-out data-[state=open]:animate-in",
position === "popper" &&
"data-[side=left]:-translate-x-1 data-[side=top]:-translate-y-1 data-[side=right]:translate-x-1 data-[side=bottom]:translate-y-1",
"data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=bottom]:translate-y-1 data-[side=top]:-translate-y-1",
className,
)}
data-slot="select-content"
@ -74,7 +74,7 @@ function SelectContent({
className={cn(
"p-1",
position === "popper" &&
"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)] scroll-my-1",
"h-(--radix-select-trigger-height) w-full min-w-(--radix-select-trigger-width) scroll-my-1",
)}
>
{children}
@ -106,7 +106,7 @@ function SelectItem({
return (
<SelectPrimitive.Item
className={cn(
"relative flex w-full cursor-default select-none items-center gap-2 rounded-sm py-1.5 pr-8 pl-2 text-sm outline-hidden focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg:not([class*='size-'])]:size-4 [&_svg:not([class*='text-'])]:text-muted-foreground [&_svg]:pointer-events-none [&_svg]:shrink-0 *:[span]:last:flex *:[span]:last:items-center *:[span]:last:gap-2",
"relative flex w-full cursor-default select-none items-center gap-2 rounded-sm py-1.5 pr-8 pl-2 text-sm outline-hidden focus:bg-accent focus:text-accent-foreground data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg:not([class*='size-'])]:size-4 [&_svg:not([class*='text-'])]:text-muted-foreground [&_svg]:pointer-events-none [&_svg]:shrink-0 *:[span]:last:flex *:[span]:last:items-center *:[span]:last:gap-2",
className,
)}
data-slot="select-item"
@ -128,7 +128,7 @@ function SelectSeparator({
}: React.ComponentProps<typeof SelectPrimitive.Separator>) {
return (
<SelectPrimitive.Separator
className={cn("-mx-1 pointer-events-none my-1 h-px bg-border", className)}
className={cn("pointer-events-none -mx-1 my-1 h-px bg-border", className)}
data-slot="select-separator"
{...props}
/>

View file

@ -1051,7 +1051,7 @@ export const AnnuncioEditForm = ({ data }: { data: AnnunciWithMedia }) => {
<FormMessage />
</div>
<p className="h-[42px]">{field.value?.join(", ")}</p>
<p className="h-10.5">{field.value?.join(", ")}</p>
</FormItem>
)}
/>
@ -1105,7 +1105,7 @@ export const AnnuncioEditForm = ({ data }: { data: AnnunciWithMedia }) => {
<FormMessage />
{field.value !== null && (
<Button
className="-top-2 absolute right-0 flex items-center gap-1"
className="absolute -top-2 right-0 flex items-center gap-1"
onClick={() => {
form.setValue("disponibile_da", null);
}}
@ -1123,7 +1123,7 @@ export const AnnuncioEditForm = ({ data }: { data: AnnunciWithMedia }) => {
<FormControl>
<Button
className={cn(
"h-[42px] w-full pl-3 text-left font-medium",
"h-10.5 w-full pl-3 text-left font-medium",
!field.value && "text-muted-foreground",
"rounded-lg border border-neutral-300 shadow-xs outline-hidden file:border-0 file:bg-transparent file:font-medium file:text-sm disabled:cursor-not-allowed disabled:opacity-50 dark:focus:border-transparent",
)}
@ -1395,7 +1395,7 @@ export const AnnuncioEditForm = ({ data }: { data: AnnunciWithMedia }) => {
</FormLabel>
{field.value !== null && field.value !== 0 && (
<Button
className="-top-2 absolute right-0 flex items-center gap-1"
className="absolute -top-2 right-0 flex items-center gap-1"
onClick={() => {
form.setValue("piano_palazzo", null);
}}
@ -1441,7 +1441,7 @@ export const AnnuncioEditForm = ({ data }: { data: AnnunciWithMedia }) => {
</FormLabel>
{field.value !== null && field.value !== 0 && (
<Button
className="-top-2 absolute right-0 flex items-center gap-1"
className="absolute -top-2 right-0 flex items-center gap-1"
onClick={() => {
form.setValue("unita_condominio", null);
}}
@ -1487,7 +1487,7 @@ export const AnnuncioEditForm = ({ data }: { data: AnnunciWithMedia }) => {
</FormLabel>
{field.value !== null && field.value !== 0 && (
<Button
className="-top-2 absolute right-0 flex items-center gap-1"
className="absolute -top-2 right-0 flex items-center gap-1"
onClick={() => {
form.setValue("numero_vani", null);
}}
@ -1533,7 +1533,7 @@ export const AnnuncioEditForm = ({ data }: { data: AnnunciWithMedia }) => {
</FormLabel>
{field.value !== null && field.value !== 0 && (
<Button
className="-top-2 absolute right-0 flex items-center gap-1"
className="absolute -top-2 right-0 flex items-center gap-1"
onClick={() => {
form.setValue("numero_camere", null);
}}
@ -1578,7 +1578,7 @@ export const AnnuncioEditForm = ({ data }: { data: AnnunciWithMedia }) => {
</FormLabel>
{field.value !== null && field.value !== 0 && (
<Button
className="-top-2 absolute right-0 flex items-center gap-1"
className="absolute -top-2 right-0 flex items-center gap-1"
onClick={() => {
form.setValue("numero_bagni", null);
}}
@ -1623,7 +1623,7 @@ export const AnnuncioEditForm = ({ data }: { data: AnnunciWithMedia }) => {
</FormLabel>
{field.value !== null && field.value !== 0 && (
<Button
className="-top-2 absolute right-0 flex items-center gap-1"
className="absolute -top-2 right-0 flex items-center gap-1"
onClick={() => {
form.setValue("numero_balconi", null);
}}
@ -1668,7 +1668,7 @@ export const AnnuncioEditForm = ({ data }: { data: AnnunciWithMedia }) => {
</FormLabel>
{field.value !== null && field.value !== 0 && (
<Button
className="-top-2 absolute right-0 flex items-center gap-1"
className="absolute -top-2 right-0 flex items-center gap-1"
onClick={() => {
form.setValue("numero_terrazzi", null);
}}
@ -1713,7 +1713,7 @@ export const AnnuncioEditForm = ({ data }: { data: AnnunciWithMedia }) => {
</FormLabel>
{field.value !== null && field.value !== 0 && (
<Button
className="-top-2 absolute right-0 flex items-center gap-1"
className="absolute -top-2 right-0 flex items-center gap-1"
onClick={() => {
form.setValue("numero_box", null);
}}
@ -1758,7 +1758,7 @@ export const AnnuncioEditForm = ({ data }: { data: AnnunciWithMedia }) => {
</FormLabel>
{field.value !== null && field.value !== 0 && (
<Button
className="-top-2 absolute right-0 flex items-center gap-1"
className="absolute -top-2 right-0 flex items-center gap-1"
onClick={() => {
form.setValue("numero_postiauto", null);
}}
@ -1806,7 +1806,7 @@ export const AnnuncioEditForm = ({ data }: { data: AnnunciWithMedia }) => {
</div>
<FormControl>
<p className="h-[42px]">{field.value?.join(", ")}</p>
<p className="h-10.5">{field.value?.join(", ")}</p>
</FormControl>
</FormItem>
)}
@ -1825,7 +1825,7 @@ export const AnnuncioEditForm = ({ data }: { data: AnnunciWithMedia }) => {
</div>
<FormControl>
<p className="h-[42px]">
<p className="h-10.5">
{field.value
? filteredCaratteristiche(field.value)
.map((v) => v.text)

View file

@ -810,7 +810,7 @@ export const FormNewServizioAcquisto = ({
<FormControl>
<Button
className={cn(
"h-[42px] w-full pl-3 text-left font-medium",
"h-10.5 w-full pl-3 text-left font-medium",
!field.value && "text-muted-foreground",
"rounded-lg border border-neutral-300 shadow-xs outline-hidden file:border-0 file:bg-transparent file:font-medium file:text-sm disabled:cursor-not-allowed disabled:opacity-50 dark:focus:border-transparent",
)}
@ -1006,7 +1006,7 @@ export const FormNewServizioAcquisto = ({
<FormControl>
<Button
className={cn(
"h-[42px] w-full pl-3 text-left font-medium",
"h-10.5 w-full pl-3 text-left font-medium",
!field.value && "text-muted-foreground",
"rounded-lg border border-neutral-300 shadow-xs outline-hidden file:border-0 file:bg-transparent file:font-medium file:text-sm disabled:cursor-not-allowed disabled:opacity-50 dark:focus:border-transparent",
)}
@ -1185,7 +1185,7 @@ export const FormNewServizioAcquisto = ({
<Tooltip delayDuration={0}>
<TooltipTrigger className="relative flex items-center gap-x-2">
{t.anagrafica.sesso}{" "}
<HelpCircleIcon className="-right-6 absolute size-5" />
<HelpCircleIcon className="absolute -right-6 size-5" />
</TooltipTrigger>
<TooltipContent>
{t.anagrafica.sesso_disclamer}

View file

@ -55,7 +55,7 @@ const FAQSection = () => {
<h2 className="font-bold text-3xl tracking-tighter md:text-4xl">
{t.faq.titolo}
</h2>
<p className="mx-auto max-w-[600px] text-muted-foreground md:text-xl/relaxed lg:text-base/relaxed xl:text-xl/relaxed">
<p className="mx-auto max-w-150 text-muted-foreground md:text-xl/relaxed lg:text-base/relaxed xl:text-xl/relaxed">
{t.faq.descrizione}
</p>
</div>
@ -83,7 +83,7 @@ const FAQSection = () => {
//defaultValue="0"
type="single"
>
<div className="-top-16 absolute" id={`faq-${item.id}`} />
<div className="absolute -top-16" id={`faq-${item.id}`} />
<h3 className="font-semibold text-2xl">{item.label}</h3>
<div className="flex flex-col gap-1">
{item.qas.map((f, i) => (

View file

@ -38,7 +38,6 @@ export const editAnagraficaHandler = async ({
data: UsersAnagraficaUpdate;
}) => {
try {
// biome-ignore lint/correctness/noUnusedVariables: <ignore>
const { idanagrafica, userid, ...rest } = data;
if (!userId) {
throw new TRPCError({