From a55dc80a5685925be16db81085c37b50078e65d6 Mon Sep 17 00:00:00 2001 From: Daniel Dietzler <36593685+danieldietzler@users.noreply.github.com> Date: Tue, 11 Aug 2026 19:15:51 +0200 Subject: [PATCH] chore: enforce strict equality checks (#30718) --- server/eslint.config.mjs | 1 + server/src/repositories/asset.repository.ts | 4 ++-- server/src/repositories/telemetry.repository.ts | 2 +- server/src/repositories/user.repository.ts | 2 +- server/src/services/auth.service.ts | 2 +- server/src/services/metadata.service.ts | 8 ++++---- server/src/services/storage-template.service.ts | 4 ++-- server/src/utils/bytes.ts | 2 +- server/src/utils/transform.ts | 2 +- web/eslint.config.js | 2 ++ web/src/lib/actions/use-actions.ts | 2 +- web/src/lib/components/asset-viewer/ActivityViewer.svelte | 6 +++--- web/src/lib/components/asset-viewer/AssetViewer.svelte | 2 +- .../lib/components/asset-viewer/VideoRemoteViewer.svelte | 6 +++--- web/src/lib/components/faces-page/PersonSidePanel.svelte | 2 +- .../components/shared-components/CoordinatesInput.svelte | 2 +- web/src/lib/components/shared-components/map/Map.svelte | 2 +- web/src/lib/elements/FormatMessage.svelte | 2 +- web/src/lib/i18n.spec.ts | 2 +- .../VirtualScrollManager/VirtualScrollManager.svelte.ts | 6 +++--- web/src/lib/modals/GeolocationUpdateConfirmModal.svelte | 1 + web/src/lib/modals/timezone-utils.ts | 2 +- web/src/lib/stores/upload.ts | 4 ++-- web/src/lib/utils/actions.ts | 2 +- web/src/lib/utils/duplicate-utils.ts | 5 +++++ web/src/lib/utils/navigation.ts | 2 +- web/src/lib/utils/timeline-util.ts | 4 ++-- web/src/routes/(user)/people/+page.svelte | 2 +- .../[[photos=photos]]/[[assetId=id]]/+page.svelte | 4 ++-- .../search/[[photos=photos]]/[[assetId=id]]/+page.svelte | 2 +- web/src/routes/(user)/user-settings/AppSettings.svelte | 2 +- .../[[photos=photos]]/[[assetId=id]]/+page.svelte | 2 +- web/src/routes/admin/system-settings/JobSettings.svelte | 2 +- web/src/routes/auth/onboarding/+page.svelte | 2 +- web/src/routes/auth/onboarding/OnboardingHello.svelte | 2 +- 35 files changed, 54 insertions(+), 45 deletions(-) diff --git a/server/eslint.config.mjs b/server/eslint.config.mjs index 2cca2cab6d..2c11b7d3cb 100644 --- a/server/eslint.config.mjs +++ b/server/eslint.config.mjs @@ -76,6 +76,7 @@ export default typescriptEslint.config([ curly: 2, 'prettier/prettier': 0, 'object-shorthand': ['error', 'always'], + eqeqeq: 'error', 'no-restricted-imports': [ 'error', diff --git a/server/src/repositories/asset.repository.ts b/server/src/repositories/asset.repository.ts index ca00245c27..add3f0a24d 100644 --- a/server/src/repositories/asset.repository.ts +++ b/server/src/repositories/asset.repository.ts @@ -838,7 +838,7 @@ export class AssetRepository { ) .$if(!!options.withCoordinates, (qb) => qb.select(['asset_exif.latitude', 'asset_exif.longitude'])) .where('asset.deletedAt', options.isTrashed ? 'is not' : 'is', null) - .$if(options.visibility == undefined, withDefaultVisibility) + .$if(options.visibility === undefined, withDefaultVisibility) .$if(!!options.visibility, (qb) => qb.where('asset.visibility', '=', options.visibility!)) .$if(!!options.bbox, (qb) => { const bbox = options.bbox!; @@ -899,7 +899,7 @@ export class AssetRepository { .$if(!!options.isTrashed, (qb) => qb.where('asset.status', '!=', AssetStatus.Deleted)) .$if(!!options.tagId, (qb) => withTagId(qb, options.tagId!)) .orderBy( - options.orderBy == AssetOrderBy.CreatedAt + options.orderBy === AssetOrderBy.CreatedAt ? sql`"createdAt"` : sql`(asset."localDateTime" AT TIME ZONE 'UTC')::date`, order, diff --git a/server/src/repositories/telemetry.repository.ts b/server/src/repositories/telemetry.repository.ts index 9a486005b5..146eaa30d7 100644 --- a/server/src/repositories/telemetry.repository.ts +++ b/server/src/repositories/telemetry.repository.ts @@ -149,7 +149,7 @@ export class TelemetryRepository { const unit = 'ms'; for (const [propName, descriptor] of Object.entries(descriptors)) { - const isMethod = typeof descriptor.value == 'function' && propName !== 'constructor'; + const isMethod = typeof descriptor.value === 'function' && propName !== 'constructor'; if (!isMethod) { continue; } diff --git a/server/src/repositories/user.repository.ts b/server/src/repositories/user.repository.ts index 11a6e532aa..afe14fb499 100644 --- a/server/src/repositories/user.repository.ts +++ b/server/src/repositories/user.repository.ts @@ -321,7 +321,7 @@ export class UserRepository { updatedAt: new Date(), }) .where('user.deletedAt', 'is', null) - .$if(id != undefined, (eb) => eb.where('user.id', '=', asUuid(id!))); + .$if(id !== undefined, (eb) => eb.where('user.id', '=', asUuid(id!))); await query.execute(); } diff --git a/server/src/services/auth.service.ts b/server/src/services/auth.service.ts index 59e20276af..5603819212 100644 --- a/server/src/services/auth.service.ts +++ b/server/src/services/auth.service.ts @@ -549,7 +549,7 @@ export class AuthService extends BaseService { const now = DateTime.now(); const updatedAt = DateTime.fromJSDate(session.updatedAt); const diff = now.diff(updatedAt, ['hours']); - if (diff.hours > 1 || appVersion != session.appVersion) { + if (diff.hours > 1 || appVersion !== session.appVersion) { await this.sessionRepository.update(session.id, { id: session.id, updatedAt: new Date(), diff --git a/server/src/services/metadata.service.ts b/server/src/services/metadata.service.ts index 53573549eb..a95d1f1497 100644 --- a/server/src/services/metadata.service.ts +++ b/server/src/services/metadata.service.ts @@ -109,7 +109,7 @@ const validateRange = (value: number | undefined, min: number, max: number): Non const val = validate(value); // check if the value is within the range - if (val == null || val < min || val > max) { + if (val === null || val < min || val > max) { return null; } @@ -372,8 +372,8 @@ export class MetadataService extends BaseService { fileModifiedAt: stats.mtime, // Keep unedited assets in sync with the file on disk, but don't overwrite edited dimensions. - width: !asset.isEdited || asset.width == null ? assetWidth : undefined, - height: !asset.isEdited || asset.height == null ? assetHeight : undefined, + width: !asset.isEdited || asset.width === null ? assetWidth : undefined, + height: !asset.isEdited || asset.height === null ? assetHeight : undefined, }), async () => { await this.assetRepository.upsertExif({ @@ -988,7 +988,7 @@ export class MetadataService extends BaseService { // timezone let timeZone = exifTags.zone ?? null; - if (timeZone == null && (dateTime?.rawValue?.endsWith('Z') || dateTime?.rawValue?.endsWith('+00:00'))) { + if (timeZone === null && (dateTime?.rawValue?.endsWith('Z') || dateTime?.rawValue?.endsWith('+00:00'))) { // exiftool-vendored returns "no timezone" information even though "+00:00" might be set explicitly // https://github.com/photostructure/exiftool-vendored.js/issues/203 timeZone = 'UTC+0'; diff --git a/server/src/services/storage-template.service.ts b/server/src/services/storage-template.service.ts index e4f2dcacf7..de731f46c6 100644 --- a/server/src/services/storage-template.service.ts +++ b/server/src/services/storage-template.service.ts @@ -402,8 +402,8 @@ export class StorageTemplateService extends BaseService { const substitutions: Record = { filename, ext: extension, - filetype: asset.type == AssetType.Image ? 'IMG' : 'VID', - filetypefull: asset.type == AssetType.Image ? 'IMAGE' : 'VIDEO', + filetype: asset.type === AssetType.Image ? 'IMG' : 'VID', + filetypefull: asset.type === AssetType.Image ? 'IMAGE' : 'VIDEO', assetId: asset.id, assetIdShort: asset.id.slice(-12), //just throw into the root if it doesn't belong to an album diff --git a/server/src/utils/bytes.ts b/server/src/utils/bytes.ts index 5e476f4dea..67e94c7aca 100644 --- a/server/src/utils/bytes.ts +++ b/server/src/utils/bytes.ts @@ -20,7 +20,7 @@ export function asHumanReadable(bytes: number, precision = 1): string { } } - return `${remainder.toFixed(magnitude == 0 ? 0 : precision)} ${units[magnitude]}`; + return `${remainder.toFixed(magnitude === 0 ? 0 : precision)} ${units[magnitude]}`; } // if an asset is jsonified in the DB before being returned, its buffer fields will be hex-encoded strings diff --git a/server/src/utils/transform.ts b/server/src/utils/transform.ts index aa1fe8b7fc..76d5247de3 100644 --- a/server/src/utils/transform.ts +++ b/server/src/utils/transform.ts @@ -227,7 +227,7 @@ export const transformOcrBoundingBox = ( const { points: transformedPoints, currentWidth, currentHeight } = transformPoints(points, edits, imageDimensions); // Reorder points to maintain semantic ordering (topLeft, topRight, bottomRight, bottomLeft) - const netRotation = edits.find((e) => e.action == AssetEditAction.Rotate)?.parameters.angle ?? 0 % 360; + const netRotation = edits.find((e) => e.action === AssetEditAction.Rotate)?.parameters.angle ?? 0 % 360; const reorderedPoints = reorderQuadPointsForRotation(transformedPoints, netRotation); const [p1, p2, p3, p4] = reorderedPoints; diff --git a/web/eslint.config.js b/web/eslint.config.js index de378d11c7..5974eaf68f 100644 --- a/web/eslint.config.js +++ b/web/eslint.config.js @@ -19,6 +19,7 @@ export default typescriptEslint.config( ...eslintPluginSvelte.configs.recommended, eslintPluginUnicorn.configs.recommended, js.configs.recommended, + prettier, { plugins: { tscompat: tslintPluginCompat, @@ -158,6 +159,7 @@ export default typescriptEslint.config( 'svelte/button-has-type': 'error', 'object-shorthand': ['error', 'always'], 'svelte/no-navigation-without-resolve': 'off', + eqeqeq: 'error', }, }, { diff --git a/web/src/lib/actions/use-actions.ts b/web/src/lib/actions/use-actions.ts index 622615358d..0b09549a03 100644 --- a/web/src/lib/actions/use-actions.ts +++ b/web/src/lib/actions/use-actions.ts @@ -40,7 +40,7 @@ export function useActions(node: HTMLElement | SVGElement, actions: ActionArray) return { update(actions: ActionArray) { - if ((actions?.length || 0) != actionReturns.length) { + if ((actions?.length || 0) !== actionReturns.length) { throw new Error('You must not change the length of an actions array.'); } diff --git a/web/src/lib/components/asset-viewer/ActivityViewer.svelte b/web/src/lib/components/asset-viewer/ActivityViewer.svelte index 803495c8bb..01c970e627 100644 --- a/web/src/lib/components/asset-viewer/ActivityViewer.svelte +++ b/web/src/lib/components/asset-viewer/ActivityViewer.svelte @@ -99,7 +99,7 @@ }; $effect(() => { - if (assetId && previousAssetId != assetId) { + if (assetId && previousAssetId !== assetId) { previousAssetId = assetId; } }); @@ -168,7 +168,7 @@ {/if} - {#if (index != activityManager.activities.length - 1 && !shouldGroup(activityManager.activities[index].createdAt, activityManager.activities[index + 1].createdAt)) || index === activityManager.activities.length - 1} + {#if (index !== activityManager.activities.length - 1 && !shouldGroup(activityManager.activities[index].createdAt, activityManager.activities[index + 1].createdAt)) || index === activityManager.activities.length - 1}
{/if}
- {#if (index != activityManager.activities.length - 1 && isTenMinutesApart(activityManager.activities[index].createdAt, activityManager.activities[index + 1].createdAt)) || index === activityManager.activities.length - 1} + {#if (index !== activityManager.activities.length - 1 && isTenMinutesApart(activityManager.activities[index].createdAt, activityManager.activities[index + 1].createdAt)) || index === activityManager.activities.length - 1}
{/if} - {#if $slideshowState != SlideshowState.None} + {#if $slideshowState !== SlideshowState.None}
- {#if castManager.castState == CastState.BUFFERING} + {#if castManager.castState === CastState.BUFFERING}
@@ -85,9 +85,9 @@ color="primary" shape="round" variant="ghost" - icon={castManager.castState == CastState.PLAYING ? mdiPause : mdiPlay} + icon={castManager.castState === CastState.PLAYING ? mdiPause : mdiPlay} onclick={() => handlePlayPauseButton()} - aria-label={castManager.castState == CastState.PLAYING ? 'Pause' : 'Play'} + aria-label={castManager.castState === CastState.PLAYING ? 'Pause' : 'Play'} /> {/if} diff --git a/web/src/lib/components/faces-page/PersonSidePanel.svelte b/web/src/lib/components/faces-page/PersonSidePanel.svelte index eaeabcc921..759bd03bce 100644 --- a/web/src/lib/components/faces-page/PersonSidePanel.svelte +++ b/web/src/lib/components/faces-page/PersonSidePanel.svelte @@ -357,7 +357,7 @@
{/if}
- {#if face.person != null} + {#if face.person !== null}
{ - if (lat != null && lng != null) { + if (lat !== undefined && lng !== undefined) { onUpdate(lat, lng); } }; diff --git a/web/src/lib/components/shared-components/map/Map.svelte b/web/src/lib/components/shared-components/map/Map.svelte index 52805d9b96..9811a8a7be 100644 --- a/web/src/lib/components/shared-components/map/Map.svelte +++ b/web/src/lib/components/shared-components/map/Map.svelte @@ -287,7 +287,7 @@ if (previousStyle) { // Preserves the custom map markers from the previous style when the theme is switched // Required until https://github.com/dimfeld/svelte-maplibre/issues/146 is fixed - const customLayers = previousStyle.layers.filter((l) => l.type == 'fill' && l.source == 'geojson'); + const customLayers = previousStyle.layers.filter((l) => l.type === 'fill' && l.source === 'geojson'); const layers = nextStyle.layers.concat(customLayers); const sources = nextStyle.sources; diff --git a/web/src/lib/elements/FormatMessage.svelte b/web/src/lib/elements/FormatMessage.svelte index 53f72451cc..cc097d783f 100644 --- a/web/src/lib/elements/FormatMessage.svelte +++ b/web/src/lib/elements/FormatMessage.svelte @@ -23,7 +23,7 @@ let { key, values = {}, children }: Props = $props(); const getLocale = (locale?: string | null) => { - if (locale == null) { + if (!locale) { throw new Error('Cannot format a message without first setting the initial locale.'); } diff --git a/web/src/lib/i18n.spec.ts b/web/src/lib/i18n.spec.ts index ebf2fdfa3b..bac5dba4b7 100644 --- a/web/src/lib/i18n.spec.ts +++ b/web/src/lib/i18n.spec.ts @@ -6,7 +6,7 @@ describe('i18n', () => { const languageFiles = readdirSync('../i18n').sort(); for (const filename of languageFiles) { test(`${filename} should have a loader`, async () => { - if (!filename.endsWith('.json') || filename == 'package.json') { + if (!filename.endsWith('.json') || filename === 'package.json') { return; } diff --git a/web/src/lib/managers/VirtualScrollManager/VirtualScrollManager.svelte.ts b/web/src/lib/managers/VirtualScrollManager/VirtualScrollManager.svelte.ts index fdbc86a7db..e3e72aec82 100644 --- a/web/src/lib/managers/VirtualScrollManager/VirtualScrollManager.svelte.ts +++ b/web/src/lib/managers/VirtualScrollManager/VirtualScrollManager.svelte.ts @@ -55,7 +55,7 @@ export abstract class VirtualScrollManager { } #setHeaderHeight(value: number) { - if (this.#headerHeight == value) { + if (this.#headerHeight === value) { return false; } this.#headerHeight = value; @@ -67,7 +67,7 @@ export abstract class VirtualScrollManager { } #setGap(value: number) { - if (this.#gap == value) { + if (this.#gap === value) { return false; } this.#gap = value; @@ -79,7 +79,7 @@ export abstract class VirtualScrollManager { } #setRowHeight(value: number) { - if (this.#rowHeight == value) { + if (this.#rowHeight === value) { return false; } this.#rowHeight = value; diff --git a/web/src/lib/modals/GeolocationUpdateConfirmModal.svelte b/web/src/lib/modals/GeolocationUpdateConfirmModal.svelte index 8230f62c73..a57dd1db6e 100644 --- a/web/src/lib/modals/GeolocationUpdateConfirmModal.svelte +++ b/web/src/lib/modals/GeolocationUpdateConfirmModal.svelte @@ -13,6 +13,7 @@ const { point, assetCount, onClose }: Props = $props(); const hasExistingLocations = $derived( + // eslint-disable-next-line eqeqeq assetMultiSelectManager.assets.some((asset) => asset.latitude != null || asset.longitude != null), ); diff --git a/web/src/lib/modals/timezone-utils.ts b/web/src/lib/modals/timezone-utils.ts index 2dfbb3fd5f..ae86e46321 100644 --- a/web/src/lib/modals/timezone-utils.ts +++ b/web/src/lib/modals/timezone-utils.ts @@ -95,7 +95,7 @@ function zoneOptionForDate(zone: string, date: string) { function sortTwoZones(zoneA: ZoneOption, zoneB: ZoneOption) { const offsetDifference = zoneA.offsetMinutes - zoneB.offsetMinutes; - if (offsetDifference != 0) { + if (offsetDifference !== 0) { return offsetDifference; } return zoneA.value.localeCompare(zoneB.value, undefined, { sensitivity: 'base' }); diff --git a/web/src/lib/stores/upload.ts b/web/src/lib/stores/upload.ts index 04a8a45bee..21929ab1e4 100644 --- a/web/src/lib/stores/upload.ts +++ b/web/src/lib/stores/upload.ts @@ -67,7 +67,7 @@ function createUploadStore() { const updateAssetMap = (id: string, mapper: (assets: UploadAsset) => UploadAsset) => { uploadAssets.update((uploadingAssets) => { return uploadingAssets.map((asset) => { - if (asset.id == id) { + if (asset.id === id) { return mapper(asset); } return asset; @@ -111,7 +111,7 @@ function createUploadStore() { }); } - return uploadingAsset.filter((a) => a.id != id); + return uploadingAsset.filter((a) => a.id !== id); }); }; diff --git a/web/src/lib/utils/actions.ts b/web/src/lib/utils/actions.ts index 3624b34f93..f5733fd5b2 100644 --- a/web/src/lib/utils/actions.ts +++ b/web/src/lib/utils/actions.ts @@ -68,7 +68,7 @@ const undoDeleteAssets = async (onUndoDelete: OnUndoDelete, assets: TimelineAsse * @param {StackResponse} stackResponse - The stack response containing the stack and assets to delete. */ export function updateStackedAssetInTimeline(timelineManager: TimelineManager, { stack, toDeleteIds }: StackResponse) { - if (stack == undefined) { + if (stack === undefined) { return; } diff --git a/web/src/lib/utils/duplicate-utils.ts b/web/src/lib/utils/duplicate-utils.ts index 86b221906f..53a52ddcf9 100644 --- a/web/src/lib/utils/duplicate-utils.ts +++ b/web/src/lib/utils/duplicate-utils.ts @@ -147,6 +147,7 @@ const metadataFields = [ titleKey: 'gps', keys: ['latitude', 'longitude'], render: (asset, $t) => + // eslint-disable-next-line eqeqeq asset.exifInfo?.latitude != null && asset.exifInfo?.longitude != null ? `${asset.exifInfo.latitude.toFixed(4)}, ${asset.exifInfo.longitude.toFixed(4)}` : $t('unknown'), @@ -173,18 +174,21 @@ const metadataFields = [ icon: mdiCameraIris, titleKey: 'f_number', keys: ['fNumber'], + // eslint-disable-next-line eqeqeq render: (asset, $t) => (asset.exifInfo?.fNumber == null ? $t('unknown') : `f/${asset.exifInfo.fNumber.toFixed(1)}`), }, { icon: mdiRayStartArrow, titleKey: 'focal_length', keys: ['focalLength'], + // eslint-disable-next-line eqeqeq render: (asset, $t) => (asset.exifInfo?.focalLength == null ? $t('unknown') : `${asset.exifInfo.focalLength} mm`), }, { icon: mdiBrightness6, titleKey: 'iso', keys: ['iso'], + // eslint-disable-next-line eqeqeq render: (asset, $t) => (asset.exifInfo?.iso == null ? $t('unknown') : `ISO ${asset.exifInfo.iso}`), }, { @@ -203,6 +207,7 @@ const metadataFields = [ icon: mdiStarOutline, titleKey: 'rating', keys: ['rating'], + // eslint-disable-next-line eqeqeq render: (asset, $t) => (asset.exifInfo?.rating == null ? $t('unknown') : `${asset.exifInfo.rating} stars`), }, { diff --git a/web/src/lib/utils/navigation.ts b/web/src/lib/utils/navigation.ts index 91513911f1..2f88da1f43 100644 --- a/web/src/lib/utils/navigation.ts +++ b/web/src/lib/utils/navigation.ts @@ -44,7 +44,7 @@ export function currentUrlReplaceAssetId(assetId: string) { // always remove the assetGridScrollTargetParams params.delete('at'); const paramsString = params.toString(); - const searchparams = paramsString == '' ? '' : '?' + params.toString(); + const searchparams = paramsString === '' ? '' : '?' + params.toString(); // this contains special casing for the /photos/:assetId photos route, which hangs directly // off / instead of a subpath, unlike every other asset-containing route. return isPhotosRoute(page.route.id) diff --git a/web/src/lib/utils/timeline-util.ts b/web/src/lib/utils/timeline-util.ts index 018d7d34ef..e1e717f45a 100644 --- a/web/src/lib/utils/timeline-util.ts +++ b/web/src/lib/utils/timeline-util.ts @@ -183,8 +183,8 @@ export const toTimelineAsset = (unknownAsset: AssetResponseDto | TimelineAsset): isFavorite: assetResponse.isFavorite, visibility: assetResponse.visibility, isTrashed: assetResponse.isTrashed, - isVideo: assetResponse.type == AssetTypeEnum.Video, - isImage: assetResponse.type == AssetTypeEnum.Image, + isVideo: assetResponse.type === AssetTypeEnum.Video, + isImage: assetResponse.type === AssetTypeEnum.Image, stack: assetResponse.stack || null, duration: assetResponse.duration || null, projectionType: assetResponse.exifInfo?.projectionType || null, diff --git a/web/src/routes/(user)/people/+page.svelte b/web/src/routes/(user)/people/+page.svelte index 733c1f556a..c1028ad658 100644 --- a/web/src/routes/(user)/people/+page.svelte +++ b/web/src/routes/(user)/people/+page.svelte @@ -222,7 +222,7 @@ const onNameChangeSubmit = async (name: string, targetPerson: PersonResponseDto) => { try { - if (name == targetPerson.name) { + if (name === targetPerson.name) { return; } diff --git a/web/src/routes/(user)/people/[personId]/[[photos=photos]]/[[assetId=id]]/+page.svelte b/web/src/routes/(user)/people/[personId]/[[photos=photos]]/[[assetId=id]]/+page.svelte index 3fe707c6df..e4389f09dc 100644 --- a/web/src/routes/(user)/people/[personId]/[[photos=photos]]/[[assetId=id]]/+page.svelte +++ b/web/src/routes/(user)/people/[personId]/[[photos=photos]]/[[assetId=id]]/+page.svelte @@ -98,7 +98,7 @@ } else if ($page.params.assetId) { previousRoute = Route.viewPerson(data.person); } - if (action == 'merge') { + if (action === 'merge') { viewMode = PersonPageViewMode.MERGE_PEOPLE; } @@ -180,7 +180,7 @@ const [, personToBeMergedInto] = result; - if (personToBeMergedInto.name != personName && person.id === personToBeMergedInto.id) { + if (personToBeMergedInto.name !== personName && person.id === personToBeMergedInto.id) { await updateAssetCount(); return { merged: true }; } diff --git a/web/src/routes/(user)/search/[[photos=photos]]/[[assetId=id]]/+page.svelte b/web/src/routes/(user)/search/[[photos=photos]]/[[assetId=id]]/+page.svelte index e7a18f1d0f..6683dbfe2e 100644 --- a/web/src/routes/(user)/search/[[photos=photos]]/[[assetId=id]]/+page.svelte +++ b/web/src/routes/(user)/search/[[photos=photos]]/[[assetId=id]]/+page.svelte @@ -201,7 +201,7 @@ personIds.map(async (personId) => { const person = await getPerson({ id: personId }); - if (person.name == '') { + if (person.name === '') { return $t('no_name'); } diff --git a/web/src/routes/(user)/user-settings/AppSettings.svelte b/web/src/routes/(user)/user-settings/AppSettings.svelte index ddfac02bfc..04c8b6af06 100644 --- a/web/src/routes/(user)/user-settings/AppSettings.svelte +++ b/web/src/routes/(user)/user-settings/AppSettings.svelte @@ -74,7 +74,7 @@ - + {selectedDate} diff --git a/web/src/routes/(user)/utilities/large-files/[[photos=photos]]/[[assetId=id]]/+page.svelte b/web/src/routes/(user)/utilities/large-files/[[photos=photos]]/[[assetId=id]]/+page.svelte index f4c0a93655..338c463375 100644 --- a/web/src/routes/(user)/utilities/large-files/[[photos=photos]]/[[assetId=id]]/+page.svelte +++ b/web/src/routes/(user)/utilities/large-files/[[photos=photos]]/[[assetId=id]]/+page.svelte @@ -38,7 +38,7 @@ }; const preAction = async (payload: Action) => { - if (payload.type == 'trash') { + if (payload.type === 'trash') { // eslint-disable-next-line @typescript-eslint/no-unused-expressions (await navigateToAsset(assetCursor?.nextAsset)) || (await navigateToAsset(assetCursor?.previousAsset)) || diff --git a/web/src/routes/admin/system-settings/JobSettings.svelte b/web/src/routes/admin/system-settings/JobSettings.svelte index a43be5e9f4..c229a788b4 100644 --- a/web/src/routes/admin/system-settings/JobSettings.svelte +++ b/web/src/routes/admin/system-settings/JobSettings.svelte @@ -66,7 +66,7 @@ description="" bind:value={configToEdit.job[queueName].concurrency} required={true} - isEdited={configToEdit.job[queueName].concurrency != config.job[queueName].concurrency} + isEdited={configToEdit.job[queueName].concurrency !== config.job[queueName].concurrency} /> {:else} { - if (nextStepIndex == -1) { + if (nextStepIndex === -1) { if (authManager.user.isAdmin) { await updateAdminOnboarding({ adminOnboardingUpdateDto: { isOnboarded: true } }); await serverConfigManager.loadServerConfig(); diff --git a/web/src/routes/auth/onboarding/OnboardingHello.svelte b/web/src/routes/auth/onboarding/OnboardingHello.svelte index 533de49f81..1b5b0d2e88 100644 --- a/web/src/routes/auth/onboarding/OnboardingHello.svelte +++ b/web/src/routes/auth/onboarding/OnboardingHello.svelte @@ -16,7 +16,7 @@ {$t('onboarding_welcome_user', { values: { user: authManager.user.name } })}

- {userRole == OnboardingRole.SERVER + {userRole === OnboardingRole.SERVER ? $t('onboarding_server_welcome_description') : $t('onboarding_user_welcome_description')}