Skip to content

Commit bf8bf96

Browse files
committed
Fix reported linter errors
1 parent ab24454 commit bf8bf96

10 files changed

Lines changed: 5 additions & 28 deletions

File tree

src/lib/components/ControlModules/ControlListener.svelte

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
1919
let timeoutHandle: TimeoutHandle | undefined;
2020
21-
const onEvent: ListenerSignature = (sid, controlType, duration, intensity) => {
21+
const onEvent: ListenerSignature = (sid, controlType, duration, _intensity) => {
2222
clearTimeout(timeoutHandle);
2323
2424
active = controlType;

src/lib/components/ControlModules/MapControlModule.svelte

Lines changed: 1 addition & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,14 @@
11
<script lang="ts">
22
import type { ShockerResponse } from '$lib/api/internal/v1';
3-
import { ControlDurationDefault, ControlIntensityDefault } from '$lib/constants/ControlConstants';
4-
import { getConnection } from '$lib/signalr/user.svelte';
5-
import type { ControlType } from '$lib/signalr/models/ControlType';
6-
import { serializeControlMessages } from '$lib/signalr/serializers/Control';
73
import { onMount } from 'svelte';
84
95
interface Props {
106
shockers: ShockerResponse[];
117
}
128
9+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
1310
let { shockers }: Props = $props();
1411
15-
let intensity: number = ControlIntensityDefault;
16-
let duration: number = ControlDurationDefault;
17-
18-
function ctrl(type: ControlType) {
19-
const conn = getConnection();
20-
if (!conn) return;
21-
serializeControlMessages(conn, [{ id: '', type, intensity, duration }]);
22-
}
23-
2412
let canvas: HTMLCanvasElement;
2513
2614
onMount(() => {

src/lib/components/ControlModules/dialogs/dialog-shocker-add.svelte

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,6 @@
3434
hubs: [string, OwnHub][];
3535
}
3636
37-
// eslint-disable-next-line svelte/no-unused-props -- properties are used via the local $state copy
3837
let { data: initialData, hubs, resolve, close }: Props = $props();
3938
4039
// svelte-ignore state_referenced_locally -- intentionally captures initial value as own reactive copy

src/lib/components/datetime-picker/time-picker-input.svelte

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@
3333
class: className,
3434
type = 'tel',
3535
value,
36-
files = $bindable(),
36+
files: _files,
3737
3838
id,
3939
name,

src/routes/(app)/settings/api-tokens/+page.svelte

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@
2424
import TokenCreateDialog from './dialog-token-create.svelte';
2525
import TokenCreatedDialog from './dialog-token-created.svelte';
2626
27-
let loading = $state<boolean>(false);
2827
let data = $state<TokenResponse[]>([]);
2928
let sorting = $state<SortingState>([]);
3029
@@ -69,21 +68,18 @@
6968
let showGenerateTokenModal = $state<boolean>(false);
7069
let createdTokenSecret = $state<string | null>(null);
7170
72-
function handleProblem(problem: ProblemDetails): boolean {
71+
function handleProblem(_problem: ProblemDetails): boolean {
7372
return false;
7473
}
7574
7675
async function loadTokens(successMessage?: string) {
77-
loading = true;
7876
try {
7977
data = await apiTokensApi.tokensListTokens();
8078
if (successMessage) {
8179
toast.success(successMessage);
8280
}
8381
} catch (error) {
8482
await handleApiError(error, handleProblem);
85-
} finally {
86-
loading = false;
8783
}
8884
}
8985

src/routes/(app)/settings/sessions/+page.svelte

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@
1616
import Button from '$lib/components/ui/button/button.svelte';
1717
import * as Card from '$lib/components/ui/card';
1818
import { renderComponent } from '$lib/components/ui/data-table';
19-
import type { ProblemDetails } from '$lib/errorhandling/ProblemDetails';
2019
import { handleApiError } from '$lib/errorhandling/apiErrorHandling';
2120
import { onMount } from 'svelte';
2221
import { toast } from 'svelte-sonner';

src/routes/(app)/shares/user/dialog-share-code-redeem.svelte

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,13 +18,11 @@
1818
1919
let { open = $bindable(), userInput = $bindable() }: Props = $props();
2020
let redeemPromise = $state<Promise<V2UserSharesListItem> | null>(null);
21-
let redeemed = $state<boolean>(false);
2221
2322
function onOpenChange(o: boolean) {
2423
if (!o) {
2524
userInput = '';
2625
redeemPromise = null;
27-
redeemed = false;
2826
}
2927
open = o;
3028
}
@@ -33,7 +31,6 @@
3331
try {
3432
redeemPromise = shockerSharesV2Api.userSharesRedeemInvite(userInput);
3533
await redeemPromise;
36-
redeemed = true;
3734
await refreshUserShares();
3835
} catch (error) {
3936
await handleApiError(error);

src/routes/(app)/shockers/own/+page.svelte

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66
import Container from '$lib/components/Container.svelte';
77
import ClassicControlModule from '$lib/components/ControlModules/ClassicControlModule.svelte';
88
import DialogShockerAdd, {
9-
type AddShockerData,
109
defaultAddShockerData,
1110
} from '$lib/components/ControlModules/dialogs/dialog-shocker-add.svelte';
1211
import MapControlModule from '$lib/components/ControlModules/MapControlModule.svelte';

src/routes/(auth)/oauth/[provider]/create/+page.svelte

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,6 @@
3838
});
3939
4040
if (!account.isVerified) {
41-
/* eslint-disable-next-line svelte/no-navigation-without-resolve -- URL is already built with resolve() */
4241
goto(resolve('/login?message=signup-success'));
4342
return;
4443
}

src/routes/flashtool/FirmwareBoardSelector.svelte

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@
3737
<div class="flex flex-row items-center justify-start gap-2">
3838
<Popover>
3939
<PopoverTrigger>
40-
<Button variant="outline" role="combobox" class="w-[240px] justify-between">
40+
<Button variant="outline" role="combobox" class="w-[240px] justify-between" {disabled}>
4141
{selectedBoard ?? 'Select a board...'}
4242
<ChevronsUpDown class="ml-2 size-4 shrink-0 opacity-50" />
4343
</Button>

0 commit comments

Comments
 (0)