feat: linting

This commit is contained in:
2025-03-18 19:02:50 -04:00
parent d8de02f789
commit 267d293927
33 changed files with 621 additions and 560 deletions

View File

@ -98,14 +98,14 @@
>
<NavigationMenu.Root orientation="vertical">
<NavigationMenu.List
class="flex w-full flex-col gap-2 overflow-y-auto overflow-x-hidden p-2"
class="flex w-full flex-col gap-2 overflow-x-hidden overflow-y-auto p-2"
>
{#each menuItems as item}
{#each menuItems as item (item.name)}
{@const Icon = item.icon}
<NavigationMenu.Item>
<NavigationMenu.Link
class={cn(
'hover:bg-surface-0 flex select-none gap-2 whitespace-nowrap rounded-lg p-2 transition-all',
'hover:bg-surface-0 flex gap-2 rounded-lg p-2 whitespace-nowrap transition-all select-none',
page.url.pathname === item.href && 'bg-surface-0'
)}
href={item.href}
@ -126,7 +126,7 @@
<div class="border-surface-0 flex flex-col gap-2 border-t p-2">
<a
href="/settings"
class="hover:bg-surface-0 flex select-none items-center gap-2 rounded-lg p-2 transition-all"
class="hover:bg-surface-0 flex items-center gap-2 rounded-lg p-2 transition-all select-none"
onclick={() => {
if (sidebarOpen) {
sidebarOpen = false;
@ -138,7 +138,7 @@
</a>
<button
class="hover:bg-surface-0 flex w-full cursor-pointer items-center gap-2 whitespace-nowrap rounded-lg p-2 transition-all"
class="hover:bg-surface-0 flex w-full cursor-pointer items-center gap-2 rounded-lg p-2 whitespace-nowrap transition-all"
onclick={logout}
>
<LogOut size="20" />
@ -152,7 +152,7 @@
</Dialog.Portal>
</Dialog.Root>
<a href="/" class="flex select-none items-center gap-2 text-2xl font-bold tracking-wider">
<a href="/" class="flex items-center gap-2 text-2xl font-bold tracking-wider select-none">
TrevStack
<LayoutGrid />
</a>
@ -160,11 +160,11 @@
<NavigationMenu.Root class="hidden md:block">
<NavigationMenu.List class="flex gap-2">
{#each menuItems as item}
{#each menuItems as item (item.name)}
<NavigationMenu.Item>
<NavigationMenu.Link
class={cn(
'hover:bg-surface-0 flex select-none gap-2 rounded-lg p-1 px-2 transition-all',
'hover:bg-surface-0 flex gap-2 rounded-lg p-1 px-2 transition-all select-none',
page.url.pathname === item.href && 'bg-surface-0'
)}
href={item.href}
@ -179,7 +179,7 @@
<Popover.Root bind:open={popupOpen}>
<Popover.Trigger
class="outline-surface-2 hover:brightness-120 bg-text text-crust h-9 w-9 cursor-pointer rounded-full text-sm outline outline-offset-2 transition-all"
class="outline-surface-2 bg-text text-crust h-9 w-9 cursor-pointer rounded-full text-sm outline outline-offset-2 transition-all hover:brightness-120"
>
<Avatar />
</Popover.Trigger>

View File

@ -50,12 +50,7 @@
</script>
<div class="mx-4 my-2 flex flex-wrap items-center justify-center gap-2">
<Input
bind:value={filter}
className="bg-mantle"
placeholder="Filter"
onchange={updateItems}
/>
<Input bind:value={filter} className="bg-mantle" placeholder="Filter" onchange={updateItems} />
<Select
items={[
{
@ -238,7 +233,7 @@
<td class="w-8"></td>
</tr>
{:then items}
{#each items as item}
{#each items as item (item.id)}
<tr class="border-surface-0 border-b">
<td class="px-6 py-3">
{item.added ? timestampDate(item.added).toLocaleString() : ''}
@ -287,7 +282,7 @@
</div>
</div>
{:then items}
{#each items as item}
{#each items as item (item.id)}
<div
class="border-surface-0 bg-mantle flex w-full flex-wrap gap-6 rounded border p-5 drop-shadow-md"
>
@ -313,7 +308,7 @@
<span class="text-subtext-0 text-sm">Quantity</span>
<span class="truncate">{item.quantity}</span>
</div>
<div class="flex justify-end ml-auto gap-2">
<div class="ml-auto flex justify-end gap-2">
{@render editModal(item)}
{@render deleteModal(item)}
</div>
@ -322,7 +317,7 @@
{/await}
</div>
<div class="mx-4 mb-4 mt-2 flex justify-end sm:mt-1">
<div class="mx-4 mt-2 mb-4 flex justify-end sm:mt-1">
<Modal bind:open={addedOpen}>
{#snippet trigger(props)}
<Button {...props} className="bg-sky">

View File

@ -17,7 +17,7 @@
<div class="m-auto flex w-96 flex-col gap-4 p-4">
<div class="flex items-center justify-center gap-4">
<div
class="outline-surface-2 bg-text text-crust h-9 w-9 select-none rounded-full text-sm outline outline-offset-2"
class="outline-surface-2 bg-text text-crust h-9 w-9 rounded-full text-sm outline outline-offset-2 select-none"
>
<Avatar />
</div>

View File

@ -5,10 +5,12 @@
let { children } = $props();
</script>
<Toaster toastOptions={{
classes: {
toast: '!bg-mantle !text-text !border-surface-0',
}
}} />
<Toaster
toastOptions={{
classes: {
toast: '!bg-mantle !text-text !border-surface-0'
}
}}
/>
{@render children()}

View File

@ -1,3 +1,3 @@
export const prerender = true;
export const ssr = false;
export const trailingSlash = 'always';
export const trailingSlash = 'always';