chore: finish migrating eslint config files; bump unicorn (#17200)

This commit is contained in:
Daniel Dietzler
2025-03-31 13:18:25 +02:00
committed by GitHub
parent e4f83680d9
commit 238c151ac3
23 changed files with 883 additions and 1286 deletions

View File

@@ -91,7 +91,9 @@ export class MachineLearningRepository {
signal: AbortSignal.timeout(MACHINE_LEARNING_PING_TIMEOUT),
});
active = response.ok;
} catch {}
} catch {
// nothing to do here
}
this.setUrlAvailability(url, active);
return active;
}

View File

@@ -6,6 +6,7 @@ describe(NotificationRepository.name, () => {
let sut: NotificationRepository;
beforeEach(() => {
// eslint-disable-next-line no-sparse-arrays
sut = new NotificationRepository(automock(LoggingRepository, { args: [, { getEnv: () => ({}) }], strict: false }));
});

View File

@@ -84,7 +84,7 @@ export class PersonRepository {
.$if(!!faceIds, (qb) => qb.where('asset_faces.id', 'in', faceIds!))
.executeTakeFirst();
return Number(result.numChangedRows) ?? 0;
return Number(result.numChangedRows ?? 0);
}
@GenerateSql({ params: [{ sourceType: SourceType.EXIF }] })
@@ -269,7 +269,7 @@ export class PersonRepository {
.where('asset_faces.id', '=', assetFaceId)
.executeTakeFirst();
return Number(result.numChangedRows) ?? 0;
return Number(result.numChangedRows ?? 0);
}
getById(personId: string): Promise<PersonEntity | null> {

View File

@@ -183,6 +183,7 @@ describe(StorageRepository.name, () => {
let sut: StorageRepository;
beforeEach(() => {
// eslint-disable-next-line no-sparse-arrays
sut = new StorageRepository(automock(LoggingRepository, { args: [, { getEnv: () => ({}) }], strict: false }));
});

View File

@@ -236,7 +236,6 @@ export class UserRepository {
stat.usage = Number(stat.usage);
stat.usagePhotos = Number(stat.usagePhotos);
stat.usageVideos = Number(stat.usageVideos);
stat.quotaSizeInBytes = stat.quotaSizeInBytes;
}
return stats;