Bump eslint

This commit is contained in:
Jon Staab 2026-08-22 10:32:51 -07:00
parent 5f3b964eec
commit 08821d27f4
27 changed files with 47 additions and 49 deletions

View file

@ -29,6 +29,9 @@ export default [
rules: { rules: {
// eslint doesn't see type parameters declared by <script generics="..."> // eslint doesn't see type parameters declared by <script generics="...">
"no-undef": "off", "no-undef": "off",
// A `$bindable()` prop with no fallback reads as an assignment nothing consumes, since the
// parent is what consumes it.
"no-useless-assignment": "off",
}, },
}, },
{ {
@ -55,6 +58,8 @@ export default [
], ],
"svelte/valid-compile": "off", "svelte/valid-compile": "off",
"svelte/no-at-html-tags": "off", "svelte/no-at-html-tags": "off",
"svelte/no-navigation-without-resolve": "off",
"svelte/prefer-svelte-reactivity": "off",
"@typescript-eslint/no-explicit-any": "off", "@typescript-eslint/no-explicit-any": "off",
"@typescript-eslint/no-extra-semi": "off", "@typescript-eslint/no-extra-semi": "off",
"@typescript-eslint/ban-ts-comment": "off", "@typescript-eslint/ban-ts-comment": "off",

View file

@ -20,7 +20,7 @@
}, },
"devDependencies": { "devDependencies": {
"@capacitor/assets": "^3.0.5", "@capacitor/assets": "^3.0.5",
"@eslint/js": "^9.39.2", "@eslint/js": "^10.0.1",
"@playwright/test": "^1.49.1", "@playwright/test": "^1.49.1",
"@sveltejs/kit": "^2.61.1", "@sveltejs/kit": "^2.61.1",
"@sveltejs/vite-plugin-svelte": "^5.1.1", "@sveltejs/vite-plugin-svelte": "^5.1.1",
@ -31,9 +31,9 @@
"autoprefixer": "^10.4.23", "autoprefixer": "^10.4.23",
"capacitor-set-version": "^2.2.0", "capacitor-set-version": "^2.2.0",
"classnames": "^2.5.1", "classnames": "^2.5.1",
"eslint": "^9.39.2", "eslint": "^10.9.0",
"eslint-config-prettier": "^9.1.2", "eslint-config-prettier": "^10.1.8",
"eslint-plugin-svelte": "^2.46.1", "eslint-plugin-svelte": "^3.23.0",
"globals": "^15.15.0", "globals": "^15.15.0",
"postcss": "^8.5.15", "postcss": "^8.5.15",
"prettier": "^3.8.1", "prettier": "^3.8.1",
@ -43,7 +43,7 @@
"svelte-check": "^4.3.5", "svelte-check": "^4.3.5",
"tailwindcss": "^4.2.2", "tailwindcss": "^4.2.2",
"typescript": "^5.9.3", "typescript": "^5.9.3",
"typescript-eslint": "^8.53.1", "typescript-eslint": "^8.67.0",
"vite": "^6.4.2", "vite": "^6.4.2",
"ws": "^8.18.3" "ws": "^8.18.3"
}, },

Binary file not shown.

View file

@ -162,7 +162,7 @@
<div <div
class="overflow-hidden text-ellipsis wrap-break-word" class="overflow-hidden text-ellipsis wrap-break-word"
style={expandBlock ? "mask-image: linear-gradient(0deg, transparent 0px, black 100px)" : ""}> style={expandBlock ? "mask-image: linear-gradient(0deg, transparent 0px, black 100px)" : ""}>
{#each shortContent as parsed, i} {#each shortContent as parsed, i (i)}
{#if isNewline(parsed) && !isBlock(i - 1)} {#if isNewline(parsed) && !isBlock(i - 1)}
<ContentNewline value={parsed.value} /> <ContentNewline value={parsed.value} />
{:else if isTopic(parsed)} {:else if isTopic(parsed)}

View file

@ -114,9 +114,10 @@
"overflow-hidden text-ellipsis", "overflow-hidden text-ellipsis",
singleLine ? "whitespace-nowrap" : "wrap-break-word", singleLine ? "whitespace-nowrap" : "wrap-break-word",
)}> )}>
{#each shortContent as parsed, i} {#each shortContent as parsed, i (i)}
{#if isNewline(parsed)} {#if isNewline(parsed)}
{#if singleLine} {#if singleLine}
<!-- eslint-disable-next-line svelte/no-useless-mustaches -->
{" "} {" "}
{:else} {:else}
<ContentNewline value={parsed.value} /> <ContentNewline value={parsed.value} />

View file

@ -2,6 +2,6 @@
const {value} = $props() const {value} = $props()
</script> </script>
{#each value as _} {#each value as _, i (i)}
<br /> <br />
{/each} {/each}

View file

@ -49,7 +49,7 @@
</label> </label>
<div class="mt-2 max-h-80 overflow-y-auto"> <div class="mt-2 max-h-80 overflow-y-auto">
<div class="grid grid-cols-8 gap-2 p-2"> <div class="grid grid-cols-8 gap-2 p-2">
{#each filteredIcons as icon} {#each filteredIcons as icon (icon.url)}
<button <button
type="button" type="button"
title={icon.name} title={icon.name}

View file

@ -114,7 +114,7 @@
Log in with Extension Log in with Extension
</Button> </Button>
{/if} {/if}
{#each signers as signerApp} {#each signers as signerApp (signerApp.name)}
<Button {disabled} class="button button-primary" onclick={() => loginWithNip55(signerApp)}> <Button {disabled} class="button button-primary" onclick={() => loginWithNip55(signerApp)}>
{#if loading === "nip55"} {#if loading === "nip55"}
<Spinner size="sm" class="mr-3" /> <Spinner size="sm" class="mr-3" />

View file

@ -3,7 +3,7 @@
</script> </script>
<div class="flex w-full"> <div class="flex w-full">
{#each Array(total) as _, i} {#each Array(total) as _, i (i)}
<div <div
class="h-1 flex-1 transition-colors {i < current class="h-1 flex-1 transition-colors {i < current
? 'bg-primary text-primary-content' ? 'bg-primary text-primary-content'

View file

@ -18,7 +18,7 @@
{:else if event.content === "-"} {:else if event.content === "-"}
<Icon icon={ThumbsDown} /> <Icon icon={ThumbsDown} />
{:else} {:else}
{#each parse(event) as parsed} {#each parse(event) as parsed, i (i)}
{#if isEmoji(parsed)} {#if isEmoji(parsed)}
<ContentEmoji value={parsed.value} /> <ContentEmoji value={parsed.value} />
{:else} {:else}

View file

@ -192,7 +192,7 @@
<span>{$reports.length}</span> <span>{$reports.length}</span>
</Button> </Button>
{/if} {/if}
{#each groupedZaps.entries() as [key, zaps]} {#each groupedZaps.entries() as [key, zaps] (key)}
{@const amount = fromMsats(sum(zaps.map(zap => zap.invoiceAmount)))} {@const amount = fromMsats(sum(zaps.map(zap => zap.invoiceAmount)))}
{@const pubkeys = uniq(zaps.map(zap => zap.request.pubkey))} {@const pubkeys = uniq(zaps.map(zap => zap.request.pubkey))}
{@const isOwn = pubkeys.includes($user.pubkey)} {@const isOwn = pubkeys.includes($user.pubkey)}
@ -217,7 +217,7 @@
<span>{amount}</span> <span>{amount}</span>
</Button> </Button>
{/each} {/each}
{#each groupedReactions.entries() as [key, events]} {#each groupedReactions.entries() as [key, events] (key)}
{@const pubkeys = events.map(e => e.pubkey)} {@const pubkeys = events.map(e => e.pubkey)}
{@const isOwn = pubkeys.includes($user.pubkey)} {@const isOwn = pubkeys.includes($user.pubkey)}
{@const info = displayList( {@const info = displayList(

View file

@ -54,7 +54,7 @@
let limit = $state(20) let limit = $state(20)
let element: Element | undefined = $state() let element: Element | undefined = $state()
const loading = $state(new SvelteSet<string>()) const loading = new SvelteSet<string>()
const relaySearch = $app.use(Relays).relaySearch const relaySearch = $app.use(Relays).relaySearch
const blockedRelayUrls = $blockedRelayLists.urls($user.pubkey).$ const blockedRelayUrls = $blockedRelayLists.urls($user.pubkey).$

View file

@ -51,7 +51,7 @@
} }
} }
const loading = $state(new SvelteSet<string>()) const loading = new SvelteSet<string>()
</script> </script>
<Modal> <Modal>

View file

@ -33,7 +33,7 @@
{PLATFORM_NAME} actively checks your connection to the network in the background to discover relays {PLATFORM_NAME} actively checks your connection to the network in the background to discover relays
that are offline, that you don't have access to, or are otherwise causing trouble. that are offline, that you don't have access to, or are otherwise causing trouble.
</p> </p>
{#each $pending as healthCheck} {#each $pending as healthCheck (healthCheck.title)}
<RelaySettingsHealthCheck {healthCheck} /> <RelaySettingsHealthCheck {healthCheck} />
{/each} {/each}
{#if $pending.length > 0} {#if $pending.length > 0}

View file

@ -46,11 +46,7 @@
} }
let canShare = $state(false) let canShare = $state(false)
let invite = $state("") let invite = $derived(makeInviteLink({url, claim: $claim, h, code: $roomCode}))
$effect(() => {
invite = makeInviteLink({url, claim: $claim, h, code: $roomCode})
})
onMount(async () => { onMount(async () => {
try { try {

View file

@ -11,7 +11,7 @@
const {url, event}: Props = $props() const {url, event}: Props = $props()
</script> </script>
{#each tagValues(hexTags("p"), event.tags) as pubkey} {#each tagValues(hexTags("p"), event.tags) as pubkey (pubkey)}
<div class="py-1 text-center text-xs opacity-75"> <div class="py-1 text-center text-xs opacity-75">
<ProfileLink unstyled class="text-primary" {url} {pubkey} /> joined the room <ProfileLink unstyled class="text-primary" {url} {pubkey} /> joined the room
</div> </div>

View file

@ -1,5 +1,4 @@
<script lang="ts"> <script lang="ts">
import {derived} from "svelte/store"
import cx from "classnames" import cx from "classnames"
import {remove} from "@welshman/lib" import {remove} from "@welshman/lib"
import AltArrowLeft from "@assets/icons/alt-arrow-left.svg?dataurl" import AltArrowLeft from "@assets/icons/alt-arrow-left.svg?dataurl"

View file

@ -76,15 +76,11 @@
const canAddMembers = $derived($supportedMethods.includes("allowpubkey")) const canAddMembers = $derived($supportedMethods.includes("allowpubkey"))
let canShare = $state(false) let canShare = $state(false)
let invite = $state("") let invite = $derived(makeInviteLink({url, claim: $claim}))
let adding = $state(false) let adding = $state(false)
let pubkeys: string[] = $state([]) let pubkeys: string[] = $state([])
$effect(() => {
invite = makeInviteLink({url, claim: $claim})
})
onMount(async () => { onMount(async () => {
try { try {
const {value} = await Share.canShare() const {value} = await Share.canShare()

View file

@ -50,12 +50,10 @@
component={ThunkStatusDetail} component={ThunkStatusDetail}
props={{thunk, retry}} props={{thunk, retry}}
params={{interactive: true, maxWidth: "none"}}> params={{interactive: true, maxWidth: "none"}}>
{#snippet children()} <span class="flex cursor-pointer items-center gap-1 opacity-75">
<span class="flex cursor-pointer items-center gap-1 opacity-75"> <Icon icon={Danger} class="text-error" size={3} />
<Icon icon={Danger} class="text-error" size={3} /> <span>Failed to send!</span>
<span>Failed to send!</span> </span>
</span>
{/snippet}
</Tippy> </Tippy>
</button> </button>
{/if} {/if}

View file

@ -275,7 +275,7 @@
class="min-h-0 flex-1 overflow-y-auto [scrollbar-gutter:stable]"> class="min-h-0 flex-1 overflow-y-auto [scrollbar-gutter:stable]">
{#if tileGrid} {#if tileGrid}
<div class="flex flex-col items-center gap-2"> <div class="flex flex-col items-center gap-2">
{#each tileGrid.rows as row, rowIndex} {#each tileGrid.rows as row, rowIndex (rowIndex)}
{@const offset = tileGrid.rows {@const offset = tileGrid.rows
.slice(0, rowIndex) .slice(0, rowIndex)
.reduce((sum, r) => sum + r.columnCount, 0)} .reduce((sum, r) => sum + r.columnCount, 0)}

View file

@ -50,7 +50,7 @@
{/snippet} {/snippet}
</Field> </Field>
<div class="grid grid-cols-2 gap-2 sm:grid-cols-4"> <div class="grid grid-cols-2 gap-2 sm:grid-cols-4">
{#each $zapAmounts as preset} {#each $zapAmounts as preset, i (i)}
<Button <Button
class={cx("button button-sm", { class={cx("button button-sm", {
"button-primary": preset === amount, "button-primary": preset === amount,

View file

@ -146,16 +146,14 @@
</div> </div>
{:else} {:else}
<ZapForm bind:amount bind:content> <ZapForm bind:amount bind:content>
{#snippet children()} <div class="card card-sm card-flat flex flex-col items-center gap-3 p-4 text-center">
<div class="card card-sm card-flat flex flex-col items-center gap-3 p-4 text-center"> <p class="text-content-muted text-sm">
<p class="text-content-muted text-sm"> Connect a wallet to pay instantly without scanning a QR code.
Connect a wallet to pay instantly without scanning a QR code. </p>
</p> <Button class="button button-neutral" onclick={connectWallet}>
<Button class="button button-neutral" onclick={connectWallet}> Connect a lightning wallet
Connect a lightning wallet </Button>
</Button> </div>
</div>
{/snippet}
</ZapForm> </ZapForm>
{/if} {/if}
</ModalBody> </ModalBody>

View file

@ -14,6 +14,9 @@
onMount(() => { onMount(() => {
editor.then(ed => { editor.then(ed => {
if (ed.options.element) { if (ed.options.element) {
// Tiptap builds and owns its editor element, so mounting it here is the point of this
// component rather than something svelte could be left to render.
// eslint-disable-next-line svelte/no-dom-manipulating
element?.append(ed.options.element) element?.append(ed.options.element)
} }

View file

@ -5,7 +5,7 @@
children?: Snippet children?: Snippet
} }
const {children, ...props}: Props = $props() const {children}: Props = $props()
</script> </script>
<div class="flex items-center gap-2 p-2 text-xs uppercase text-content-subtle"> <div class="flex items-center gap-2 p-2 text-xs uppercase text-content-subtle">

View file

@ -55,6 +55,7 @@
</script> </script>
<div class="flex flex-col gap-2" role="list"> <div class="flex flex-col gap-2" role="list">
<!-- eslint-disable-next-line svelte/require-each-key -->
{#each value as item, index} {#each value as item, index}
<div <div
class="flex items-center gap-2" class="flex items-center gap-2"

View file

@ -62,7 +62,7 @@
class="select input input-sm absolute bottom-1 right-1 w-auto" class="select input input-sm absolute bottom-1 right-1 w-auto"
bind:value={camera} bind:value={camera}
onchange={changeCamera}> onchange={changeCamera}>
{#each cameras as camera} {#each cameras as camera (camera.id)}
<option value={camera.id}>{camera.label || `Camera ${camera.id}`}</option> <option value={camera.id}>{camera.label || `Camera ${camera.id}`}</option>
{/each} {/each}
</select> </select>

View file

@ -269,6 +269,7 @@
</strong> </strong>
<p class="text-sm opacity-75">Preset amounts shown when sending a zap.</p> <p class="text-sm opacity-75">Preset amounts shown when sending a zap.</p>
<div class="flex flex-col gap-2"> <div class="flex flex-col gap-2">
<!-- eslint-disable-next-line svelte/require-each-key -->
{#each zapAmountDraft as amount, index} {#each zapAmountDraft as amount, index}
<div class="flex items-center gap-2"> <div class="flex items-center gap-2">
<Button <Button