mirror of
https://github.com/immich-app/immich.git
synced 2026-09-30 13:23:21 +08:00
chore(deps): update dependency eslint-plugin-unicorn to v76 (#31885)
Co-authored-by: Daniel Dietzler <mail@ddietzler.dev>
This commit is contained in:
co-authored by
Daniel Dietzler
parent
6cd746ad22
commit
0993482b0b
+1
-1
@@ -40,7 +40,7 @@
|
||||
"eslint": "^10.0.0",
|
||||
"eslint-config-prettier": "^10.1.8",
|
||||
"eslint-plugin-prettier": "^5.1.3",
|
||||
"eslint-plugin-unicorn": "^75.0.0",
|
||||
"eslint-plugin-unicorn": "^76.0.0",
|
||||
"exiftool-vendored": "^35.0.0",
|
||||
"globals": "^17.0.0",
|
||||
"luxon": "^3.4.4",
|
||||
|
||||
@@ -118,8 +118,8 @@ export function getTimeBucket(
|
||||
if (deletedAssetIds.has(asset.id) || archivedAssetIds.has(asset.id) || favoritedAssetIds.has(asset.id)) {
|
||||
return {
|
||||
...asset,
|
||||
isFavorite: favoritedAssetIds.has(asset.id) ? true : asset.isFavorite,
|
||||
isTrashed: deletedAssetIds.has(asset.id) ? true : asset.isTrashed,
|
||||
isFavorite: favoritedAssetIds.has(asset.id) || asset.isFavorite,
|
||||
isTrashed: deletedAssetIds.has(asset.id) || asset.isTrashed,
|
||||
visibility: archivedAssetIds.has(asset.id) ? AssetVisibility.Archive : asset.visibility,
|
||||
};
|
||||
}
|
||||
|
||||
@@ -33,7 +33,7 @@
|
||||
"eslint": "^10.0.0",
|
||||
"eslint-config-prettier": "^10.1.8",
|
||||
"eslint-plugin-prettier": "^5.1.3",
|
||||
"eslint-plugin-unicorn": "^75.0.0",
|
||||
"eslint-plugin-unicorn": "^76.0.0",
|
||||
"globals": "^17.0.0",
|
||||
"mock-fs": "^5.2.0",
|
||||
"prettier": "^3.7.4",
|
||||
|
||||
Generated
+11
-11
@@ -157,8 +157,8 @@ importers:
|
||||
specifier: ^5.1.3
|
||||
version: 5.5.6(@types/eslint@9.6.1)(eslint-config-prettier@10.1.8(eslint@10.10.0(jiti@2.7.0)(supports-color@8.1.1)))(eslint@10.10.0(jiti@2.7.0)(supports-color@8.1.1))(prettier@3.9.8)
|
||||
eslint-plugin-unicorn:
|
||||
specifier: ^75.0.0
|
||||
version: 75.0.0(eslint@10.10.0(jiti@2.7.0)(supports-color@8.1.1))
|
||||
specifier: ^76.0.0
|
||||
version: 76.0.0(eslint@10.10.0(jiti@2.7.0)(supports-color@8.1.1))
|
||||
exiftool-vendored:
|
||||
specifier: ^35.0.0
|
||||
version: 35.21.0
|
||||
@@ -272,8 +272,8 @@ importers:
|
||||
specifier: ^5.1.3
|
||||
version: 5.5.6(@types/eslint@9.6.1)(eslint-config-prettier@10.1.8(eslint@10.10.0(jiti@2.7.0)(supports-color@8.1.1)))(eslint@10.10.0(jiti@2.7.0)(supports-color@8.1.1))(prettier@3.9.8)
|
||||
eslint-plugin-unicorn:
|
||||
specifier: ^75.0.0
|
||||
version: 75.0.0(eslint@10.10.0(jiti@2.7.0)(supports-color@8.1.1))
|
||||
specifier: ^76.0.0
|
||||
version: 76.0.0(eslint@10.10.0(jiti@2.7.0)(supports-color@8.1.1))
|
||||
globals:
|
||||
specifier: ^17.0.0
|
||||
version: 17.12.0
|
||||
@@ -747,8 +747,8 @@ importers:
|
||||
specifier: ^5.1.3
|
||||
version: 5.5.6(@types/eslint@9.6.1)(eslint-config-prettier@10.1.8(eslint@10.10.0(jiti@2.7.0)(supports-color@8.1.1)))(eslint@10.10.0(jiti@2.7.0)(supports-color@8.1.1))(prettier@3.9.8)
|
||||
eslint-plugin-unicorn:
|
||||
specifier: ^75.0.0
|
||||
version: 75.0.0(eslint@10.10.0(jiti@2.7.0)(supports-color@8.1.1))
|
||||
specifier: ^76.0.0
|
||||
version: 76.0.0(eslint@10.10.0(jiti@2.7.0)(supports-color@8.1.1))
|
||||
globals:
|
||||
specifier: ^17.0.0
|
||||
version: 17.12.0
|
||||
@@ -1012,8 +1012,8 @@ importers:
|
||||
specifier: ^3.12.4
|
||||
version: 3.23.0(eslint@10.10.0(jiti@2.7.0)(supports-color@8.1.1))(svelte@5.57.0(@typescript-eslint/types@8.70.0))
|
||||
eslint-plugin-unicorn:
|
||||
specifier: ^75.0.0
|
||||
version: 75.0.0(eslint@10.10.0(jiti@2.7.0)(supports-color@8.1.1))
|
||||
specifier: ^76.0.0
|
||||
version: 76.0.0(eslint@10.10.0(jiti@2.7.0)(supports-color@8.1.1))
|
||||
factory.ts:
|
||||
specifier: ^1.4.1
|
||||
version: 1.4.2
|
||||
@@ -7814,8 +7814,8 @@ packages:
|
||||
svelte:
|
||||
optional: true
|
||||
|
||||
eslint-plugin-unicorn@75.0.0:
|
||||
resolution: {integrity: sha512-72I7eSn+/z5CpgValFBl9mp2JE5UPD+nUUyB/VIGUMF1rCP1i37mA05zfIAVIU312A+qCZ38T8tSZr3oaMv4Mw==}
|
||||
eslint-plugin-unicorn@76.0.0:
|
||||
resolution: {integrity: sha512-3ywJrCMHKYhcBP5yFzGaOOX3dY7+iR3hvpuoS/0EnhRFgVWLejly+t4fOdJvWQxJdHZl1C+QBW7hybXPDld4Pw==}
|
||||
engines: {node: '>=22'}
|
||||
peerDependencies:
|
||||
eslint: '>=10.4'
|
||||
@@ -21171,7 +21171,7 @@ snapshots:
|
||||
transitivePeerDependencies:
|
||||
- ts-node
|
||||
|
||||
eslint-plugin-unicorn@75.0.0(eslint@10.10.0(jiti@2.7.0)(supports-color@8.1.1)):
|
||||
eslint-plugin-unicorn@76.0.0(eslint@10.10.0(jiti@2.7.0)(supports-color@8.1.1)):
|
||||
dependencies:
|
||||
'@eslint-community/eslint-utils': 4.10.1(eslint@10.10.0(jiti@2.7.0)(supports-color@8.1.1))
|
||||
'@eslint/css-tree': 4.0.5
|
||||
|
||||
+1
-1
@@ -156,7 +156,7 @@
|
||||
"eslint-import-resolver-typescript": "^4.4.5",
|
||||
"eslint-plugin-import-x": "^4.17.1",
|
||||
"eslint-plugin-prettier": "^5.1.3",
|
||||
"eslint-plugin-unicorn": "^75.0.0",
|
||||
"eslint-plugin-unicorn": "^76.0.0",
|
||||
"globals": "^17.0.0",
|
||||
"mock-fs": "^5.2.0",
|
||||
"pngjs": "^7.0.0",
|
||||
|
||||
@@ -22,7 +22,7 @@ const PersonCreateSchema = z
|
||||
.meta({ format: 'date' })
|
||||
.nullable()
|
||||
.optional()
|
||||
.refine((val) => (val ? new Date(val) <= new Date() : true), { error: 'Birth date cannot be in the future' })
|
||||
.refine((val) => !val || new Date(val) <= new Date(), { error: 'Birth date cannot be in the future' })
|
||||
.describe('Person date of birth'),
|
||||
isHidden: z.boolean().optional().describe('Person visibility (hidden)'),
|
||||
isFavorite: z.boolean().optional().describe('Mark as favorite'),
|
||||
|
||||
@@ -160,7 +160,7 @@ export const mapWorkflowShare = (workflow: Workflow & { steps: WorkflowStep[] })
|
||||
method: `${step.pluginName}#${step.methodName}`,
|
||||
// TODO fix this
|
||||
config: step.config as any,
|
||||
enabled: step.enabled ? undefined : false,
|
||||
enabled: step.enabled && undefined,
|
||||
})),
|
||||
};
|
||||
};
|
||||
|
||||
@@ -17,7 +17,7 @@ export class OcrRepository {
|
||||
|
||||
@GenerateSql({ params: [DummyValue.UUID] })
|
||||
getByAssetId(id: string, options?: { isVisible?: boolean }) {
|
||||
const isVisible = options === undefined ? true : options.isVisible;
|
||||
const isVisible = options === undefined || options.isVisible;
|
||||
|
||||
return this.db
|
||||
.selectFrom('asset_ocr')
|
||||
|
||||
@@ -98,7 +98,7 @@ export class SharedLinkService extends BaseService {
|
||||
password: dto.password,
|
||||
expiresAt: dto.expiresAt || null,
|
||||
allowUpload: dto.allowUpload ?? true,
|
||||
allowDownload: dto.showMetadata === false ? false : (dto.allowDownload ?? true),
|
||||
allowDownload: dto.showMetadata !== false && (dto.allowDownload ?? true),
|
||||
showExif: dto.showMetadata ?? true,
|
||||
slug: dto.slug || null,
|
||||
});
|
||||
|
||||
@@ -59,7 +59,7 @@ export class SystemConfigService extends BaseService {
|
||||
@OnEvent({ name: 'ConfigInit', priority: -100 })
|
||||
onConfigInit({ newConfig: { logging, machineLearning } }: ArgOf<'ConfigInit'>) {
|
||||
const { logLevel: envLevel } = this.configRepository.getEnv();
|
||||
const configLevel = logging.enabled ? logging.level : false;
|
||||
const configLevel = logging.enabled && logging.level;
|
||||
const level = envLevel ?? configLevel;
|
||||
this.logger.setLogLevel(level);
|
||||
this.logger.log(`LogLevel=${level} ${envLevel ? '(set via IMMICH_LOG_LEVEL)' : '(set via system config)'}`);
|
||||
|
||||
+1
-1
@@ -100,7 +100,7 @@
|
||||
"eslint-plugin-compat": "^7.0.0",
|
||||
"eslint-plugin-prettier": "^5.5.6",
|
||||
"eslint-plugin-svelte": "^3.12.4",
|
||||
"eslint-plugin-unicorn": "^75.0.0",
|
||||
"eslint-plugin-unicorn": "^76.0.0",
|
||||
"factory.ts": "^1.4.1",
|
||||
"globals": "^17.0.0",
|
||||
"happy-dom": "^20.0.0",
|
||||
|
||||
@@ -229,9 +229,9 @@
|
||||
bind:this={element}
|
||||
data-asset={asset.id}
|
||||
data-thumbnail-focus-container
|
||||
data-selected={selected ? true : undefined}
|
||||
data-readonly={readonly ? true : undefined}
|
||||
data-disabled={disabled ? true : undefined}
|
||||
data-selected={selected || undefined}
|
||||
data-readonly={readonly || undefined}
|
||||
data-disabled={disabled || undefined}
|
||||
tabindex={0}
|
||||
role="link"
|
||||
>
|
||||
|
||||
@@ -90,8 +90,8 @@ class MemoryManager {
|
||||
const { showUpcoming, onlyFavorites } = userPreferencesManager.memories;
|
||||
this.setFilters({
|
||||
order: MemorySearchOrder.Desc,
|
||||
isSaved: onlyFavorites ? true : undefined,
|
||||
isUpcoming: showUpcoming ? undefined : false,
|
||||
isSaved: onlyFavorites || undefined,
|
||||
isUpcoming: showUpcoming && undefined,
|
||||
});
|
||||
|
||||
return this.refresh();
|
||||
|
||||
@@ -86,7 +86,7 @@ class SearchManager {
|
||||
display: {
|
||||
isArchive: searchQuery.visibility === AssetVisibility.Archive,
|
||||
isFavorite: searchQuery.isFavorite ?? false,
|
||||
isNotInAlbum: 'isNotInAlbum' in searchQuery ? (searchQuery.isNotInAlbum ?? false) : false,
|
||||
isNotInAlbum: 'isNotInAlbum' in searchQuery && (searchQuery.isNotInAlbum ?? false),
|
||||
},
|
||||
mediaType:
|
||||
searchQuery.type === AssetTypeEnum.Image
|
||||
|
||||
@@ -24,5 +24,5 @@ export function updateObject(target: any, source: any): boolean {
|
||||
return updated;
|
||||
}
|
||||
export function isMismatched<T>(option: T | undefined, value: T): boolean {
|
||||
return option === undefined ? false : option !== value;
|
||||
return option !== undefined && option !== value;
|
||||
}
|
||||
|
||||
@@ -22,7 +22,21 @@
|
||||
let isHidden = $state(untrack(() => filter.isHidden));
|
||||
let users = $state<UserResponseDto[]>([]);
|
||||
|
||||
const cycle = (value?: boolean) => (value === undefined ? true : value ? false : undefined);
|
||||
const cycle = (value?: boolean) => {
|
||||
switch (value) {
|
||||
case undefined: {
|
||||
return true;
|
||||
}
|
||||
|
||||
case true: {
|
||||
return false;
|
||||
}
|
||||
|
||||
case false: {
|
||||
return undefined;
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
onMount(async () => {
|
||||
try {
|
||||
|
||||
@@ -14,7 +14,7 @@ class SidebarStore {
|
||||
* Toggles the sidebar visibility, if available at the current screen width.
|
||||
*/
|
||||
toggle() {
|
||||
this.isOpen = mediaQueryManager.isFullSidebar ? true : !this.isOpen;
|
||||
this.isOpen = mediaQueryManager.isFullSidebar || !this.isOpen;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+3
-3
@@ -229,7 +229,7 @@
|
||||
return { albumId, order: album.order };
|
||||
});
|
||||
|
||||
const isShared = $derived(viewMode === AlbumPageViewMode.SELECT_ASSETS ? false : album.albumUsers.length > 1);
|
||||
const isShared = $derived(viewMode !== AlbumPageViewMode.SELECT_ASSETS && album.albumUsers.length > 1);
|
||||
|
||||
$effect(() => {
|
||||
if (assetViewerManager.isViewing || !isShared) {
|
||||
@@ -251,10 +251,10 @@
|
||||
const isEditor = $derived(isAlbumEditor(album));
|
||||
|
||||
const isSelectionMode = $derived(
|
||||
viewMode === AlbumPageViewMode.SELECT_ASSETS ? true : viewMode === AlbumPageViewMode.SELECT_THUMBNAIL,
|
||||
viewMode === AlbumPageViewMode.SELECT_ASSETS || viewMode === AlbumPageViewMode.SELECT_THUMBNAIL,
|
||||
);
|
||||
const singleSelect = $derived(
|
||||
viewMode === AlbumPageViewMode.SELECT_ASSETS ? false : viewMode === AlbumPageViewMode.SELECT_THUMBNAIL,
|
||||
viewMode !== AlbumPageViewMode.SELECT_ASSETS && viewMode === AlbumPageViewMode.SELECT_THUMBNAIL,
|
||||
);
|
||||
const showArchiveIcon = $derived(viewMode !== AlbumPageViewMode.SELECT_ASSETS);
|
||||
const onSelect = ({ id }: { id: string }) => {
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
import { onDestroy } from 'svelte';
|
||||
import { t } from 'svelte-i18n';
|
||||
|
||||
let gCastEnabled = $state(authManager.authenticated ? authManager.preferences.cast.gCastEnabled : false);
|
||||
let gCastEnabled = $state(authManager.authenticated && authManager.preferences.cast.gCastEnabled);
|
||||
|
||||
onDestroy(async () => {
|
||||
try {
|
||||
|
||||
Reference in New Issue
Block a user