fix: Fix lint errors (#559)

* cleanup: postactions styling

* misc: fix first round of errors

* pkg: remove vitest

* fix: fix lint errors stage 2

* fix: fix lint errors stage 3

* fix: fix lint errors, stage 3

* misc: update eslint rules to warn for writable derived
This commit is contained in:
Xylight authored and GitHub committed 2025-06-09 16:34:06 -07:00
1 parent 1824245f13
commit 76c581123a
225 files changed
+1553 -2352

No files matched your search

+11 -27
View File
@@ -1,36 +1,19 @@
<script lang="ts">
import { preventDefault } from 'svelte/legacy'
import { navigating, page } from '$app/state'
import {
GlobeAmericas,
Icon,
InformationCircle,
MagnifyingGlass,
QuestionMarkCircle,
} from 'svelte-hero-icons'
import Pageination from '$lib/components/ui/Pageination.svelte'
import { searchParam } from '$lib/util.svelte.js'
import {
Button,
Material,
Popover,
Select,
Spinner,
TextInput,
} from 'mono-svelte'
import Sort from '$lib/components/lemmy/dropdowns/Sort.svelte'
import Placeholder from '$lib/components/ui/Placeholder.svelte'
import CommunityItem from '$lib/components/lemmy/community/CommunityItem.svelte'
import Location from '$lib/components/lemmy/dropdowns/Location.svelte'
import { t } from '$lib/i18n/translations.js'
import Sort from '$lib/components/lemmy/dropdowns/Sort.svelte'
import Skeleton from '$lib/components/ui/generic/Skeleton.svelte'
import Header from '$lib/components/ui/layout/pages/Header.svelte'
import Tabs from '$lib/components/ui/layout/pages/Tabs.svelte'
import Pageination from '$lib/components/ui/Pageination.svelte'
import Placeholder from '$lib/components/ui/Placeholder.svelte'
import SectionTitle from '$lib/components/ui/SectionTitle.svelte'
import { t } from '$lib/i18n/translations.js'
import { Button, Material, TextInput } from 'mono-svelte'
import { Icon, MagnifyingGlass, QuestionMarkCircle } from 'svelte-hero-icons'
import { expoOut } from 'svelte/easing'
import { fly } from 'svelte/transition'
import { backOut, expoOut } from 'svelte/easing'
import { goto } from '$app/navigation'
import Skeleton from '$lib/components/ui/generic/Skeleton.svelte'
let { data } = $props()
@@ -46,7 +29,7 @@
</script>
<svelte:window
onkeydown={(e) => {
onkeydown={e => {
if (e.target == document.body) searchElement?.focus()
}}
/>
@@ -104,6 +87,7 @@
{#if navigating.to?.route.id == '/communities'}
<div class="flex flex-col gap-3 mt-6">
{#each new Array(5) as _, index}
{_}
<div
in:fly|global={{
duration: 800,
@@ -195,7 +179,7 @@
<Tabs routes={[]} class="mx-auto">
<Pageination
page={Number(page.url.searchParams.get('page')) || 1}
href={(c) => `?page=${c}`}
href={c => `?page=${c}`}
/>
</Tabs>
</div>
+2 -8
View File
@@ -1,13 +1,7 @@
import { profile } from '$lib/auth.svelte'
import { LINKED_INSTANCE_URL } from '$lib/instance.svelte.js'
import { client, getClient } from '$lib/lemmy.svelte.js'
import { getClient } from '$lib/lemmy.svelte.js'
import { ReactiveState } from '$lib/promise.svelte'
import {
type ListCommunitiesResponse,
type ListingType,
type SortType,
} from 'lemmy-js-client'
import { get } from 'svelte/store'
import { type ListingType, type SortType } from 'lemmy-js-client'
export async function load({ url, fetch }) {
const type =
+19 -4
View File
@@ -1,12 +1,27 @@
<script lang="ts">
import { getClient } from '$lib/lemmy.svelte.js'
import type { CommunityView, SubscribedType } from 'lemmy-js-client'
import type {
CommunityResponse,
CommunityView,
SubscribedType,
} from 'lemmy-js-client'
import { profile } from '$lib/auth.svelte.js'
import { toast } from 'mono-svelte'
import { errorMessage } from '$lib/lemmy/error'
interface Props {
community?: CommunityView | undefined
children?: import('svelte').Snippet<[any]>
children?: import('svelte').Snippet<
[
{
subscribe: (
id?: number,
subscribed?: SubscribedType,
) => Promise<CommunityResponse | undefined>
subscribing: boolean
},
]
>
}
let { community = undefined, children }: Props = $props()
@@ -30,8 +45,8 @@
subscribing = false
return res
} catch (error) {
toast({ content: error as any, type: 'error' })
} catch (err) {
toast({ content: errorMessage(err as string), type: 'error' })
}
subscribing = false