From 82078b3a05f73c3bd5161fac9b2a6fb58b41f4fd Mon Sep 17 00:00:00 2001 From: RevIQ Date: Fri, 9 Jan 2026 16:39:33 +0800 Subject: [PATCH] Fix floating promise lint errors and apply code formatting - Add void operator to async calls in $effect() blocks to satisfy noFloatingPromises lint rule: - passkey/+page.svelte: void authenticate() - verify/+page.svelte: void verifyEmail() - Apply biome formatter import reorganization across auth files Co-Authored-By: Claude Opus 4.5 --- .../lib/components/auth/error-alert.svelte | 12 +- .../src/lib/components/auth/index.ts | 4 +- .../auth/password-form-field.svelte | 52 ++-- .../lib/components/auth/password-input.svelte | 58 ++-- .../components/auth/password-strength.svelte | 40 +-- .../ui/alert/alert-description.svelte | 16 +- .../components/ui/alert/alert-title.svelte | 16 +- .../src/lib/components/ui/alert/alert.svelte | 30 +-- .../src/lib/components/ui/alert/index.ts | 17 +- .../lib/components/ui/loading-button/index.ts | 5 +- .../ui/loading-button/loading-button.svelte | 30 +-- .../src/lib/stores/auth.svelte.ts | 11 +- .../src/lib/utils/validation.ts | 25 +- .../src/routes/auth/+layout.svelte | 10 +- .../src/routes/auth/confirm/+page.svelte | 134 +++++----- .../routes/auth/forgot-password/+page.svelte | 78 +++--- .../src/routes/auth/login/+page.svelte | 56 ++-- .../routes/auth/login/passkey/+page.svelte | 14 +- .../routes/auth/login/password/+page.svelte | 71 ++--- .../routes/auth/reset-password/+page.svelte | 126 +++++---- .../src/routes/auth/setup/user/+page.svelte | 130 ++++----- .../src/routes/auth/signup/+page.svelte | 247 ++++++++++-------- .../src/routes/auth/trust-device/+page.svelte | 124 ++++----- .../src/routes/auth/verify/+page.svelte | 13 +- .../src/routes/login/+page.svelte | 10 +- 25 files changed, 692 insertions(+), 637 deletions(-) diff --git a/apps/publisher-dashboard/src/lib/components/auth/error-alert.svelte b/apps/publisher-dashboard/src/lib/components/auth/error-alert.svelte index 8940009..2e124ba 100644 --- a/apps/publisher-dashboard/src/lib/components/auth/error-alert.svelte +++ b/apps/publisher-dashboard/src/lib/components/auth/error-alert.svelte @@ -1,12 +1,12 @@ {#if message} diff --git a/apps/publisher-dashboard/src/lib/components/auth/index.ts b/apps/publisher-dashboard/src/lib/components/auth/index.ts index 1dc6826..75f95c5 100644 --- a/apps/publisher-dashboard/src/lib/components/auth/index.ts +++ b/apps/publisher-dashboard/src/lib/components/auth/index.ts @@ -1,4 +1,4 @@ +export { default as ErrorAlert } from "./error-alert.svelte"; +export { default as PasswordFormField } from "./password-form-field.svelte"; export { default as PasswordInput } from "./password-input.svelte"; export { default as PasswordStrength } from "./password-strength.svelte"; -export { default as PasswordFormField } from "./password-form-field.svelte"; -export { default as ErrorAlert } from "./error-alert.svelte"; diff --git a/apps/publisher-dashboard/src/lib/components/auth/password-form-field.svelte b/apps/publisher-dashboard/src/lib/components/auth/password-form-field.svelte index dbf3890..5d09bea 100644 --- a/apps/publisher-dashboard/src/lib/components/auth/password-form-field.svelte +++ b/apps/publisher-dashboard/src/lib/components/auth/password-form-field.svelte @@ -1,32 +1,32 @@
diff --git a/apps/publisher-dashboard/src/lib/components/auth/password-input.svelte b/apps/publisher-dashboard/src/lib/components/auth/password-input.svelte index ba361ec..2fedbe3 100644 --- a/apps/publisher-dashboard/src/lib/components/auth/password-input.svelte +++ b/apps/publisher-dashboard/src/lib/components/auth/password-input.svelte @@ -1,37 +1,37 @@
diff --git a/apps/publisher-dashboard/src/lib/components/auth/password-strength.svelte b/apps/publisher-dashboard/src/lib/components/auth/password-strength.svelte index 7fc28c4..c4b3510 100644 --- a/apps/publisher-dashboard/src/lib/components/auth/password-strength.svelte +++ b/apps/publisher-dashboard/src/lib/components/auth/password-strength.svelte @@ -1,27 +1,31 @@ {#if password} diff --git a/apps/publisher-dashboard/src/lib/components/ui/alert/alert-description.svelte b/apps/publisher-dashboard/src/lib/components/ui/alert/alert-description.svelte index 8b56aed..c74e5ed 100644 --- a/apps/publisher-dashboard/src/lib/components/ui/alert/alert-description.svelte +++ b/apps/publisher-dashboard/src/lib/components/ui/alert/alert-description.svelte @@ -1,13 +1,13 @@
- import type { HTMLAttributes } from "svelte/elements"; - import { cn, type WithElementRef } from "$lib/utils.js"; +import type { HTMLAttributes } from "svelte/elements"; +import { cn, type WithElementRef } from "$lib/utils.js"; - let { - ref = $bindable(null), - class: className, - children, - ...restProps - }: WithElementRef> = $props(); +let { + ref = $bindable(null), + class: className, + children, + ...restProps +}: WithElementRef> = $props();
- import { type VariantProps, tv } from "tailwind-variants"; +import { tv, type VariantProps } from "tailwind-variants"; - export const alertVariants = tv({ - base: "relative grid w-full grid-cols-[0_1fr] items-start gap-y-0.5 rounded-lg border px-4 py-3 text-sm has-[>svg]:grid-cols-[calc(var(--spacing)*4)_1fr] has-[>svg]:gap-x-3 [&>svg]:size-4 [&>svg]:translate-y-0.5 [&>svg]:text-current", - variants: { - variant: { - default: "bg-card text-card-foreground", - destructive: - "text-destructive bg-card *:data-[slot=alert-description]:text-destructive/90 [&>svg]:text-current", - }, - }, - defaultVariants: { - variant: "default", - }, - }); +export const alertVariants = tv({ + base: "relative grid w-full grid-cols-[0_1fr] items-start gap-y-0.5 rounded-lg border px-4 py-3 text-sm has-[>svg]:grid-cols-[calc(var(--spacing)*4)_1fr] has-[>svg]:gap-x-3 [&>svg]:size-4 [&>svg]:translate-y-0.5 [&>svg]:text-current", + variants: { + variant: { + default: "bg-card text-card-foreground", + destructive: + "text-destructive bg-card *:data-[slot=alert-description]:text-destructive/90 [&>svg]:text-current", + }, + }, + defaultVariants: { + variant: "default", + }, +}); - export type AlertVariant = VariantProps["variant"]; +export type AlertVariant = VariantProps["variant"];