Skip to content

Commit bbbdcb5

Browse files
committed
lint
1 parent 7273d16 commit bbbdcb5

20 files changed

Lines changed: 50 additions & 35 deletions

warpgate-web/eslint.config.mjs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@ export default [
2020
'@stylistic': stylistic,
2121
},
2222
languageOptions: {
23-
parser: svelteParser,
2423
parserOptions: {
2524
projectService: true,
2625
tsconfigRootDir: import.meta.dirname,

warpgate-web/src/admin/CreateOtpModal.svelte

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@
120120
<Fa class="me-2" fw icon={faRefresh} />
121121
Regenerate
122122
</Button>
123-
<CopyButton class="d-flex align-items-center" color="secondary" text={totpUri!} label={'Copy URI'} />
123+
<CopyButton class="d-flex align-items-center" color="secondary" text={totpUri!} label='Copy URI' />
124124
</div>
125125
<FormGroup floating label="Paste the generated OTP code" class="mt-3" spacing="0">
126126
<Input

warpgate-web/src/admin/LogViewer.svelte

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ onDestroy(() => {
127127
<div class="table-wrapper">
128128
<table class="w-100">
129129
<tbody>
130-
{#each visibleItems as item}
130+
{#each visibleItems as item (item.id)}
131131
<tr>
132132
<td class="timestamp pe-4">
133133
{stringifyDate(item.timestamp)}
@@ -151,7 +151,7 @@ onDestroy(() => {
151151
{item.text}
152152
</span>
153153

154-
{#each Object.entries(item.values ?? {}) as pair}
154+
{#each Object.entries(item.values ?? {}) as pair (pair[0])}
155155
<span class="key">{pair[0]}:</span>
156156
<span class="value">{pair[1]}</span>
157157
{/each}
@@ -194,7 +194,6 @@ onDestroy(() => {
194194
</div>
195195
{/if}
196196

197-
198197
<style lang="scss">
199198
@import "../theme/vars.light";
200199

warpgate-web/src/admin/Session.svelte

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@
120120
{#if recordings?.length }
121121
<h3 class="mt-4">Recordings</h3>
122122
<div class="list-group list-group-flush">
123-
{#each recordings as recording}
123+
{#each recordings as recording (recording.id)}
124124
<a
125125
class="list-group-item list-group-item-action"
126126
href="/recordings/{recording.id}"

warpgate-web/src/admin/SsoCredentialModal.svelte

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@
7474
type="select"
7575
>
7676
<option value={null} selected>Any</option>
77-
{#each providers as provider}
77+
{#each providers as provider (provider.name)}
7878
<option value={provider.name}>{provider.label ?? provider.name}</option>
7979
{/each}
8080
</Input>

warpgate-web/src/admin/config/CreateTarget.svelte

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@
9898
<!-- svelte-ignore a11y_label_has_associated_control -->
9999
<label class="mb-2">Type</label>
100100
<ButtonGroup class="w-100 mb-3">
101-
{#each kinds as kind}
101+
{#each kinds as kind (kind.value)}
102102
<RadioButton
103103
label={kind.name}
104104
value={kind.value}

warpgate-web/src/admin/config/CreateTicket.svelte

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ async function create () {
9292
{#if users}
9393
<FormGroup floating label="Authorize as user">
9494
<select bind:value={selectedUser} class="form-control">
95-
{#each users as user}
95+
{#each users as user (user.id)}
9696
<option value={user}>
9797
{user.username}
9898
</option>
@@ -104,7 +104,7 @@ async function create () {
104104
{#if targets}
105105
<FormGroup floating label="Target">
106106
<select bind:value={selectedTarget} class="form-control">
107-
{#each targets as target}
107+
{#each targets as target (target.id)}
108108
<option value={target}>
109109
{target.name}
110110
</option>

warpgate-web/src/admin/config/SSHKeys.svelte

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ async function deleteHost (host: SSHKnownHost) {
3636
<h2>Warpgate's own SSH keys</h2>
3737
<Alert color="info">Add these keys to the targets' <code>authorized_keys</code> files</Alert>
3838
<div class="list-group list-group-flush">
39-
{#each ownKeys as key}
39+
{#each ownKeys as key (key)}
4040
<div class="list-group-item d-flex">
4141
<pre>{key.kind} {key.publicKeyBase64}</pre>
4242
<div class="ms-auto">

warpgate-web/src/admin/config/Tickets.svelte

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,8 @@
4747

4848
{#if tickets.length}
4949
<div class="list-group list-group-flush">
50-
{#each tickets as ticket}
50+
{#each tickets as ticket (ticket.id)}
51+
<!-- svelte-ignore a11y_no_static_element_interactions -->
5152
<div class="list-group-item">
5253
<div>
5354
<strong>
@@ -79,7 +80,9 @@
7980
<small class="text-muted me-4 ms-auto">
8081
<RelativeDate date={ticket.created} />
8182
</small>
82-
<a href={''} onclick={e => {
83+
<!-- svelte-ignore a11y_click_events_have_key_events -->
84+
<!-- svelte-ignore a11y_missing_attribute -->
85+
<a onclick={e => {
8386
deleteTicket(ticket)
8487
e.preventDefault()
8588
}}>Delete</a>

warpgate-web/src/admin/config/User.svelte

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@
9191

9292
<h4 class="mt-4">User roles</h4>
9393
<div class="list-group list-group-flush mb-3">
94-
{#each allRoles as role}
94+
{#each allRoles as role (role.id)}
9595
<label
9696
for="role-{role.id}"
9797
class="list-group-item list-group-item-action d-flex align-items-center"

0 commit comments

Comments
 (0)