chore(deps): update dependency eslint-plugin-unicorn to v72 (#30092)

Co-authored-by: Daniel Dietzler <mail@ddietzler.dev>
This commit is contained in:
renovate[bot]
2026-07-21 15:33:46 +02:00
committed by GitHub
co-authored by Daniel Dietzler
parent ce022233ae
commit aa08dad1f5
27 changed files with 144 additions and 149 deletions
+1
View File
@@ -64,6 +64,7 @@ export default typescriptEslint.config([
'unicorn/consistent-boolean-name': 'off',
'unicorn/no-computed-property-existence-check': 'off',
'unicorn/no-non-function-verb-prefix': 'off',
'unicorn/prefer-simple-condition-first': 'off',
// prefer the typescript-eslint type-aware version
'unicorn/require-array-sort-compare': 'off',
'@typescript-eslint/require-array-sort-compare': 'error',
+1 -1
View File
@@ -151,7 +151,7 @@
"eslint": "^10.0.0",
"eslint-config-prettier": "^10.1.8",
"eslint-plugin-prettier": "^5.1.3",
"eslint-plugin-unicorn": "^70.0.0",
"eslint-plugin-unicorn": "^72.0.0",
"globals": "^17.0.0",
"mock-fs": "^5.2.0",
"pngjs": "^7.0.0",
@@ -128,7 +128,7 @@ export class AssetMediaController {
this.logger.deprecate(
'Calling the thumbnail endpoint with size=original is deprecated. Use the :id/original endpoint instead',
);
const [_, reqSearch] = req.url.split('?');
const [_, reqSearch] = req.url.split('?', 2);
const redirSearchParams = new URLSearchParams(reqSearch);
redirSearchParams.delete('size');
return res.redirect('original?' + redirSearchParams.toString());
@@ -142,7 +142,7 @@ export class AssetMediaController {
// viewThumbnailRes is a AssetMediaRedirectResponse
// which redirects to the original asset or a specific size to make better use of caching
const { targetSize } = viewThumbnailRes;
const [reqPath, reqSearch] = req.url.split('?');
const [reqPath, reqSearch] = req.url.split('?', 2);
let redirPath: string;
const redirSearchParams = new URLSearchParams(reqSearch);
if (targetSize === 'original') {
+1 -1
View File
@@ -313,7 +313,7 @@ export class MediaRepository {
if (!line) {
return;
}
const [ptsStr, durationStr, flags] = line.split(',');
const [ptsStr, durationStr, flags] = line.split(',', 3);
const pts = Number.parseInt(ptsStr);
const duration = Number.parseInt(durationStr);
if (Number.isNaN(pts) || Number.isNaN(duration) || !flags) {
+1 -1
View File
@@ -461,7 +461,7 @@ export class AuthService extends BaseService {
}
private getBearerToken(headers: IncomingHttpHeaders): string | null {
const [type, token] = (headers.authorization || '').split(' ');
const [type, token] = (headers.authorization || '').split(' ', 2);
if (type.toLowerCase() === 'bearer') {
return token;
}
@@ -214,7 +214,6 @@ export class DatabaseBackupService {
bin: `/usr/lib/postgresql/${databaseMajorVersion}/bin/${bin}`,
args,
databaseUsername,
// eslint-disable-next-line unicorn/prefer-minimal-ternary
databasePassword: isUrlConnection ? new URL(databaseConfig.url).password : databaseConfig.password,
databaseVersion,
databaseMajorVersion,
@@ -15,6 +15,7 @@ import { makeStream, newTestService, ServiceMocks } from 'test/utils';
import { vitest } from 'vitest';
async function* mockWalk() {
// eslint-disable-next-line unicorn/no-useless-promise-resolve-reject
yield await Promise.resolve(['/data/user1/photo.jpg']);
}
+1 -1
View File
@@ -51,7 +51,7 @@ export class SystemConfigService extends BaseService {
@OnEvent({ name: 'ConfigValidate' })
onConfigValidate({ newConfig, oldConfig }: ArgOf<'ConfigValidate'>) {
const { logLevel } = this.configRepository.getEnv();
if (!_.isEqual(toPlainObject(newConfig.logging), oldConfig.logging) && logLevel) {
if (logLevel && !_.isEqual(toPlainObject(newConfig.logging), oldConfig.logging)) {
throw new Error('Logging cannot be changed while the environment variable IMMICH_LOG_LEVEL is set.');
}
}
+1 -1
View File
@@ -172,7 +172,7 @@ export const mimeTypes = {
return AssetType.Image;
}
if (contentType.startsWith('video/') || contentType === 'application/mxf') {
if (contentType === 'application/mxf' || contentType.startsWith('video/')) {
return AssetType.Video;
}
+1 -1
View File
@@ -9,7 +9,7 @@ type Impossible<K extends keyof any> = {
type Exact<T, U extends T = T> = U & Impossible<Exclude<keyof U, keyof T>>;
export const fromAck = (ack: string): SyncAck => {
const [type, updateId, extraId] = ack.split('|');
const [type, updateId, extraId] = ack.split('|', 3);
return { type: type as SyncEntityType, updateId, extraId };
};