diff --git a/packages/media/src/react/placeholder/utils/fileSizeToBytes.ts b/packages/media/src/react/placeholder/utils/fileSizeToBytes.ts index 9f9c4bc7ee..dda7eacc04 100644 --- a/packages/media/src/react/placeholder/utils/fileSizeToBytes.ts +++ b/packages/media/src/react/placeholder/utils/fileSizeToBytes.ts @@ -15,6 +15,7 @@ export const fileSizeToBytes = (fileSize: FileSize, file: File): number => { const match = fileSize.match(regex); if (!match) { + // eslint-disable-next-line @typescript-eslint/only-throw-error throw createUploadError(UploadErrorCode.InvalidFileSize, { invalidateFiles: [file], }); diff --git a/packages/media/src/react/placeholder/utils/matchFileType.ts b/packages/media/src/react/placeholder/utils/matchFileType.ts index 529f3a38f5..324e535843 100644 --- a/packages/media/src/react/placeholder/utils/matchFileType.ts +++ b/packages/media/src/react/placeholder/utils/matchFileType.ts @@ -1,3 +1,4 @@ +/* eslint-disable @typescript-eslint/only-throw-error */ import type { AllowedFileType, FileRouterInputKey } from '../internal/mimes'; import { lookup } from '../internal/utils'; diff --git a/packages/media/src/react/placeholder/utils/validateFileItem.ts b/packages/media/src/react/placeholder/utils/validateFileItem.ts index 4078376072..90be6ed7ae 100644 --- a/packages/media/src/react/placeholder/utils/validateFileItem.ts +++ b/packages/media/src/react/placeholder/utils/validateFileItem.ts @@ -1,3 +1,4 @@ +/* eslint-disable @typescript-eslint/only-throw-error */ import { type FileSize, type MediaItemConfig, UploadErrorCode } from '../type'; import { createUploadError } from './createUploadError'; import { fileSizeToBytes } from './fileSizeToBytes'; diff --git a/packages/media/src/react/placeholder/utils/validateFiles.ts b/packages/media/src/react/placeholder/utils/validateFiles.ts index caf9eb458e..f8b67ea7c6 100644 --- a/packages/media/src/react/placeholder/utils/validateFiles.ts +++ b/packages/media/src/react/placeholder/utils/validateFiles.ts @@ -1,3 +1,4 @@ +/* eslint-disable @typescript-eslint/only-throw-error */ import type { uploadConfig } from '../PlaceholderPlugin'; import type { AllowedFileType } from '../internal/mimes';