mirror of
https://github.com/immich-app/immich.git
synced 2026-03-04 09:57:33 +03:00
chore: finish migrating eslint config files; bump unicorn (#17200)
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
@@ -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 }));
|
||||
});
|
||||
|
||||
|
||||
@@ -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> {
|
||||
|
||||
@@ -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 }));
|
||||
});
|
||||
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user