Skip to content

Commit 33b567d

Browse files
committed
Fix eslint errors in Lexbox admin UI
FW Lite UI (frontend/viewer) will be next
1 parent 8ac5c84 commit 33b567d

29 files changed

Lines changed: 39 additions & 47 deletions

frontend/eslint.config.js

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -143,12 +143,4 @@ export default [
143143
}
144144
},
145145
},
146-
{
147-
// TEMPORARY IGNORES, to be gotten rid of as soon as possible - 2025-07-24 RM
148-
files: ['**/*.svelte', '**/*.svelte.ts'],
149-
rules: {
150-
'svelte/require-each-key': 'off',
151-
'svelte/no-useless-mustaches': 'off',
152-
},
153-
},
154146
];

frontend/src/lib/components/HgLogView.svelte

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,7 @@
136136
</thead>
137137
<tbody>
138138
{#if logEntries?.length}
139-
{#each expandedLog as log, idx}
139+
{#each expandedLog as log, idx (log.node)}
140140
<tr>
141141
{#if idx === 0}
142142
<td class="py-0 w-0" rowspan="1000000">

frontend/src/lib/components/ProjectList.svelte

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
</script>
1515

1616
<div class="grid grid-cols-1 xs:grid-cols-2 sm:grid-cols-3 auto-rows-fr gap-2 md:gap-4 max-xs:justify-items-center">
17-
{#each projects as project}
17+
{#each projects as project (project.id)}
1818
{#if project.isDraft}
1919
<div class="draft card aspect-square bg-base-200 overflow-hidden">
2020
<div class="bg" style="background-image: url('{getProjectTypeIcon(project.type)}')"></div>

frontend/src/lib/components/Projects/ProjectConfidentialityFilterSelect.svelte

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
<div class="relative">
2222
<Select {...rest} label={$t('project.confidential.confidentiality')} helpLink={helpLinks.confidentiality} bind:value>
2323
<option value={undefined}>{$t('common.any')}</option>
24-
{#each Object.entries(options) as [value, label]}
24+
{#each Object.entries(options) as [value, label] (value)}
2525
<option {value}>{$t(label)}</option>
2626
{/each}
2727
</Select>

frontend/src/lib/components/Projects/ProjectFilter.svelte

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@
9898
{loading}
9999
>
100100
{#snippet activeFilterSlot({ activeFilters })}
101-
{#each activeFilters as filter}
101+
{#each activeFilters as filter (filter.key)}
102102
{#if filter.key === 'projectType'}
103103
<ActiveFilter {filter}>
104104
<ProjectTypeIcon type={filter.value} />

frontend/src/lib/components/Projects/ProjectTable.svelte

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@
5555
</tr>
5656
</thead>
5757
<tbody>
58-
{#each projects as project}
58+
{#each projects as project (project.id)}
5959
<tr>
6060
{#if isColumnVisible('name')}
6161
<td>

frontend/src/lib/components/Projects/WritingSystemList.svelte

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
<div class="w-full">
1414
{#if writingSystems.length > 0}
1515
<BadgeList>
16-
{#each writingSystems as ws}
16+
{#each writingSystems as ws (ws.tag)}
1717
<WritingSystemBadge tag={ws.tag} isActive={ws.isActive} isDefault={ws.isDefault} />
1818
{/each}
1919
</BadgeList>

frontend/src/lib/components/TrainTracks.svelte

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -113,10 +113,10 @@
113113
{#if circles?.length > 0}
114114
<svg width={maxWidth} height="0" style="height: 100%">
115115
{#if rowHeights?.length > 0}
116-
{#each curves as curve}
116+
{#each curves as curve (curve)}
117117
<path fill="none" stroke={curve.color} stroke-width="1.5" d={curve.d} />
118118
{/each}
119-
{#each svgDots as c}
119+
{#each svgDots as c (c)}
120120
<circle cx={c.x} cy={c.y} r={circleSize} fill={c.color} stroke="none" style="" />
121121
{/each}
122122
{/if}

frontend/src/lib/components/Users/UserFilter.svelte

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -54,8 +54,8 @@
5454
{loading}
5555
>
5656
{#snippet activeFilterSlot({ activeFilters })}
57-
58-
{#each activeFilters as filter}
57+
58+
{#each activeFilters as filter (filter.key)}
5959
{#if filter.key === 'userType' && filter.value}
6060
<ActiveFilter {filter}>
6161
{#if filter.value === 'admin'}
@@ -76,10 +76,10 @@
7676
</ActiveFilter>
7777
{/if}
7878
{/each}
79-
79+
8080
{/snippet}
8181
{#snippet filterSlot()}
82-
82+
8383
<h2 class="card-title">{$t('admin_dashboard.user_filter.title')}</h2>
8484
{#if filterEnabled('userType')}
8585
<div class="form-control">
@@ -97,6 +97,6 @@
9797
</label>
9898
</div>
9999
{/if}
100-
100+
101101
{/snippet}
102102
</FilterBar>

frontend/src/lib/components/Users/UserProjects.svelte

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@
7373
</tr>
7474
</thead>
7575
<tbody>
76-
{#each projects as proj}
76+
{#each projects as proj (proj.id)}
7777
{@const isManager = proj.memberRole === ProjectRole.Manager}
7878
<tr>
7979
<td class="p-0 w-4">

0 commit comments

Comments
 (0)