Skip to content
Merged
Show file tree
Hide file tree
Changes from 6 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 0 additions & 8 deletions frontend/eslint.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -143,12 +143,4 @@ export default [
}
},
},
{
// TEMPORARY IGNORES, to be gotten rid of as soon as possible - 2025-07-24 RM
files: ['**/*.svelte', '**/*.svelte.ts'],
rules: {
'svelte/require-each-key': 'off',
'svelte/no-useless-mustaches': 'off',
},
},
];
2 changes: 1 addition & 1 deletion frontend/src/lib/components/HgLogView.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@
</thead>
<tbody>
{#if logEntries?.length}
{#each expandedLog as log, idx}
{#each expandedLog as log, idx (log.node)}
<tr>
{#if idx === 0}
<td class="py-0 w-0" rowspan="1000000">
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/lib/components/ProjectList.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
</script>

<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">
{#each projects as project}
{#each projects as project (project.id)}
{#if project.isDraft}
<div class="draft card aspect-square bg-base-200 overflow-hidden">
<div class="bg" style="background-image: url('{getProjectTypeIcon(project.type)}')"></div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
<div class="relative">
<Select {...rest} label={$t('project.confidential.confidentiality')} helpLink={helpLinks.confidentiality} bind:value>
<option value={undefined}>{$t('common.any')}</option>
{#each Object.entries(options) as [value, label]}
{#each Object.entries(options) as [value, label] (value)}
<option {value}>{$t(label)}</option>
{/each}
</Select>
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/lib/components/Projects/ProjectFilter.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@
{loading}
>
{#snippet activeFilterSlot({ activeFilters })}
{#each activeFilters as filter}
{#each activeFilters as filter (filter.key)}
{#if filter.key === 'projectType'}
<ActiveFilter {filter}>
<ProjectTypeIcon type={filter.value} />
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/lib/components/Projects/ProjectTable.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@
</tr>
</thead>
<tbody>
{#each projects as project}
{#each projects as project (project.id)}
<tr>
{#if isColumnVisible('name')}
<td>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
<div class="w-full">
{#if writingSystems.length > 0}
<BadgeList>
{#each writingSystems as ws}
{#each writingSystems as ws (ws.tag)}
<WritingSystemBadge tag={ws.tag} isActive={ws.isActive} isDefault={ws.isDefault} />
{/each}
</BadgeList>
Expand Down
4 changes: 2 additions & 2 deletions frontend/src/lib/components/TrainTracks.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -113,10 +113,10 @@
{#if circles?.length > 0}
<svg width={maxWidth} height="0" style="height: 100%">
{#if rowHeights?.length > 0}
{#each curves as curve}
{#each curves as curve (curve)}
<path fill="none" stroke={curve.color} stroke-width="1.5" d={curve.d} />
{/each}
{#each svgDots as c}
{#each svgDots as c (c)}
<circle cx={c.x} cy={c.y} r={circleSize} fill={c.color} stroke="none" style="" />
{/each}
{/if}
Expand Down
10 changes: 5 additions & 5 deletions frontend/src/lib/components/Users/UserFilter.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,8 @@
{loading}
>
{#snippet activeFilterSlot({ activeFilters })}
{#each activeFilters as filter}

{#each activeFilters as filter (filter.key)}
{#if filter.key === 'userType' && filter.value}
<ActiveFilter {filter}>
{#if filter.value === 'admin'}
Expand All @@ -76,10 +76,10 @@
</ActiveFilter>
{/if}
{/each}

{/snippet}
{#snippet filterSlot()}

<h2 class="card-title">{$t('admin_dashboard.user_filter.title')}</h2>
{#if filterEnabled('userType')}
<div class="form-control">
Expand All @@ -97,6 +97,6 @@
</label>
</div>
{/if}

{/snippet}
</FilterBar>
2 changes: 1 addition & 1 deletion frontend/src/lib/components/Users/UserProjects.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@
</tr>
</thead>
<tbody>
{#each projects as proj}
{#each projects as proj (proj.id)}
{@const isManager = proj.memberRole === ProjectRole.Manager}
<tr>
<td class="p-0 w-4">
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/lib/components/Users/UserTable.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
</tr>
</thead>
<tbody>
{#each shownUsers as user}
{#each shownUsers as user (user.id)}
<tr>
<td>
<div class="flex items-center gap-2 max-w-40 @xl:max-w-52">
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/lib/forms/DisplayLanguageSelect.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
<!-- Make sure we don't overwrite persisted locales that we don't support yet -->
<option {value}>{value} ({$t('account_settings.language.not_supported')})</option>
{/if}
{#each availableLocales as locale}
{#each availableLocales as locale (locale)}
<option value={locale}>{localNames[locale] ?? locale}</option>
{/each}
</Select>
2 changes: 1 addition & 1 deletion frontend/src/lib/forms/ProjectTypeSelect.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
{#if undefinedOptionLabel}
<option value={undefined}>{undefinedOptionLabel}</option>
{/if}
{#each types as type}
{#each types as type (type)}
<option value={type}><FormatProjectType {type} /></option>
{/each}
{#if includeUnknown}
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/lib/forms/RadioButtonGroup.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
<div class="legend" id={`label-${id}`}>
{label}
</div>
{#each buttons as button}
{#each buttons as button (button.value)}
<div class="form-control w-full">
<label class="label cursor-pointer justify-normal pb-0">
<input {id} type="radio" bind:group={value} value={button.value} class="radio mr-2 {variant ?? ''}" />
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/lib/forms/UserTypeSelect.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
{#if undefinedOptionLabel}
<option value={undefined}>{undefinedOptionLabel}</option>
{/if}
{#each Object.entries(options) as [value, label]}
{#each Object.entries(options) as [value, label] (value)}
<option {value}>{$t(label)}</option>
{/each}
</Select>
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/lib/forms/UserTypeahead.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@
/>
<div class="overlay-content">
<ul class="menu p-0">
{#each filteredResults as user, idx}
{#each filteredResults as user, idx (user.id)}
<li class={(highlightIdx == idx) ? 'p-0 bg-primary text-white' : 'p-0'}><button class="whitespace-nowrap" onclick={() => {
setTimeout(() => selectUser(user));
}}>{formatResult(user)}</button></li>
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/lib/layout/Breadcrumbs/Breadcrumbs.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

<div class="text-sm breadcrumbs p-0 max-xs:invisible">
<ul>
{#each $crumbs as crumb}
{#each $crumbs as crumb (crumb)}
<RenderElement tag="li" el={crumb}/>
{/each}
</ul>
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/routes/(authenticated)/admin/AdminTabs.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@

<div role="tablist" class="hidden admin-tabs:flex tabs tabs-lifted tabs-lg overflow-x-auto">
<div class="tab tab-divider"></div>
{#each adminTabs as tab}
{#each adminTabs as tab (tab)}
{@const isActiveTab = activeTab === tab}
<button
onclick={() => onClickTab?.(tab)}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@
<div>
Feature flags:
<ul>
{#each allPossibleFlags as flag}
{#each allPossibleFlags as flag (flag)}
<li>
<label
><input type="checkbox" name="featureFlags" value={flag} bind:group={$form!.featureFlags} />
Expand Down
4 changes: 2 additions & 2 deletions frontend/src/routes/(authenticated)/authorize/+page.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
</div>
<div class="bg-base-200/50 py-5 px-8">
<div class="grid gap-x-3 gap-y-5" style="grid-template-columns: auto 1fr">
{#each data.scope?.split(' ') ?? [] as scope}
{#each data.scope?.split(' ') ?? [] as scope (scope)}
{#if scope === 'profile'}
<div class="grid grid-cols-subgrid col-span-full items-center">
<AuthenticatedUserIcon size="text-4xl" />
Expand All @@ -53,7 +53,7 @@
</div>
</div>
<div>
{#each Object.entries(data.postback) as [key, value]}
{#each Object.entries(data.postback) as [key, value] (key)}
<!--parameters required to resume the auth process-->
<input type="hidden" name={key} {value} />
{/each}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@
{#if addedMembers.length > 0}
<div class="mt-2">
<BadgeList>
{#each addedMembers as user}
{#each addedMembers as user (user.username)}
<OrgMemberBadge member={{ name: user.username, role: user.role }} />
{/each}
</BadgeList>
Expand All @@ -125,7 +125,7 @@
{#if notFoundMembers.length > 0}
<div class="mt-2">
<BadgeList>
{#each notFoundMembers as user}
{#each notFoundMembers as user (user.username)}
<OrgMemberBadge member={{ name: user.username, role: user.role }} />
{/each}
</BadgeList>
Expand All @@ -139,7 +139,7 @@
</p>
<div class="mt-2">
<BadgeList>
{#each existingMembers as user}
{#each existingMembers as user (user.username)}
<OrgMemberBadge member={{ name: user.username, role: user.role }} />
{/each}
</BadgeList>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@
</tr>
</thead>
<tbody>
{#each shownUsers as member}
{#each shownUsers as member (member.id)}
{@const memberUser = member.user}
{@const isOrgAdmin = member.role === OrgRole.Admin}
<tr>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@

<div role="tablist" class="flex tabs tabs-lifted tabs-lg overflow-x-auto">
<div class="tab tab-divider"></div>
{#each visibleTabs as tab}
{#each visibleTabs as tab (tab)}
{@const isActiveTab = activeTab === tab}
<button onclick={() => activeTab = tab} role="tab" class:tab-active={isActiveTab} class="tab grow flex-1 basis-1/2">
<h2 class="text-lg flex gap-4 items-center">
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/routes/(authenticated)/org/list/+page.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ TODO:
</tr>
{/if}
{/if}
{#each [...myOrgs, ...otherOrgs] as org, i}
{#each [...myOrgs, ...otherOrgs] as org, i (org.id)}
{@const isFirstOtherOrg = i === myOrgs.length}
{#if showingMyOrgsHeader && isFirstOtherOrg}
<tr>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@
{/snippet}
{#snippet children({ errors })}
<Select id="org" label={$t('project_page.organization.title')} bind:value={$form!.orgId} error={errors.orgId}>
{#each orgList as org}
{#each orgList as org (org.id)}
<option value={org.id}>{org.name}</option>
{/each}
</Select>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,6 @@
</Select>
{/snippet}
{#snippet submitText()}
<span>{'Add Purpose'}</span>
<span>{$t('project_page.add_purpose.add_button')}</span>
{/snippet}
</FormModal>
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@
{#if addedMembers.length > 0}
<div class="mt-2">
<BadgeList>
{#each addedMembers as user}
{#each addedMembers as user (user.username)}
<MemberBadge member={{ name: user.username, role: user.role }} />
{/each}
</BadgeList>
Expand All @@ -159,7 +159,7 @@
{#if createdMembers.length > 0}
<div class="mt-2">
<BadgeList>
{#each createdMembers as user}
{#each createdMembers as user (user.username)}
<MemberBadge member={{ name: user.username, role: user.role }} />
{/each}
</BadgeList>
Expand All @@ -173,7 +173,7 @@
</p>
<div class="mt-2">
<BadgeList>
{#each existingMembers as user}
{#each existingMembers as user (user.username)}
<MemberBadge member={{ name: user.username, role: user.role }} />
{/each}
</BadgeList>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -238,8 +238,8 @@
<ProjectTypeSelect bind:value={$form.type} error={$errors.type} />

<Select id="org" label={$t('project.create.org')} bind:value={$form.orgId} error={$errors.orgId}>
<option value={''}>{$t('project_page.organization.placeholder')}</option>
{#each myOrgs as org}
<option value="">{$t('project_page.organization.placeholder')}</option>
{#each myOrgs as org (org.id)}
<option value={org.id}>{org.name}</option>
{/each}
</Select>
Expand Down Expand Up @@ -300,7 +300,7 @@
<div class="legend" id="label-extra-projects">
{$t('project.create.maybe_related')}
</div>
{#each relatedProjects.current as proj}
{#each relatedProjects.current as proj (proj.id)}
<div class="form-control w-full">
<label class="label cursor-pointer justify-normal pb-0">
<input
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@

<TitlePage title={$t('register.title')}>
<div class="flex flex-col pb-2">
<RegisterWithGoogleButton href={`/api/login/google`}/>
<RegisterWithGoogleButton href="/api/login/google"/>
</div>
<div class="divider lowercase">{$t('common.or')}</div>
<CreateUser handleSubmit={register} onSubmitted={onSubmit} />
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/routes/+error.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

{#if page.data.user}
<HomeBreadcrumb />
{#each page.url.pathname.split('/').slice(1) as path}
{#each page.url.pathname.split('/').slice(1) as path (path)}
<PageBreadcrumb>{path}</PageBreadcrumb>
{/each}
{/if}
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/routes/email/tester/[email protected]
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@
<label class="label cursor-pointer inline-flex gap-4 m-4">
<span class="label-text">Email template:</span>
<select class="select select-info" bind:value={currEmail}>
{#each emails as email}
{#each emails as email (email)}
<option value={email}>{email.label ?? email.template.replaceAll(/([a-z])([A-Z])/g, '$1 $2')}</option>
{/each}
</select>
Expand Down
2 changes: 1 addition & 1 deletion frontend/svelte.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { vitePreprocess } from '@sveltejs/vite-plugin-svelte';
const config = {
compilerOptions: {
warningFilter: (warning) => warning.code != 'element_invalid_self_closing_tag',
enableSourcemap: true
// enableSourcemap: true // Sourcemaps are always on in Svelte 5, no need to enable them explicitly
},
onwarn: (warning, handler) => {
// eslint-plugin-svelte needs its own warning filter, duplicating the one from compilerOptions
Expand Down
10 changes: 0 additions & 10 deletions frontend/viewer/eslint.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -154,14 +154,4 @@ export default [
},
},
...storybook.configs["flat/recommended"],
{
// TEMPORARY IGNORES, to be gotten rid of as soon as possible - 2025-07-24 RM
files: ['**/*.svelte', '**/*.svelte.ts'],
rules: {
'svelte/require-each-key': 'off',
'svelte/no-useless-mustaches': 'off',
'svelte/prefer-svelte-reactivity': 'off',
'svelte/no-unused-props': 'off',
},
},
];
2 changes: 1 addition & 1 deletion frontend/viewer/src/home/HomeView.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,7 @@
</ButtonListItem>
{/each}
<DevContent>
<ButtonListItem href={`/testing/project-view`}>
<ButtonListItem href="/testing/project-view">
<ListItem title={$t`Test Project`} icon={mdiTestTube}
classes={{root: 'dark:bg-muted/50 bg-muted/80 hover:bg-muted/30 hover:dark:bg-muted'}}>
<div slot="actions" class="pointer-events-none shrink-0">
Expand Down
Loading
Loading