diff --git a/src/decorator/string/IsIP.ts b/src/decorator/string/IsIP.ts index 840f28afd1..fd3d160086 100644 --- a/src/decorator/string/IsIP.ts +++ b/src/decorator/string/IsIP.ts @@ -11,6 +11,7 @@ export const IS_IP = 'isIp'; * If given value is not a string, then it returns false. */ export function isIP(value: unknown, version?: IsIpVersion): boolean { + /* eslint-disable-next-line @typescript-eslint/no-unnecessary-type-assertion */ const versionStr = version ? (`${version}` as '4' | '6') : undefined; return typeof value === 'string' && isIPValidator(value, versionStr); } diff --git a/src/decorator/string/IsISBN.ts b/src/decorator/string/IsISBN.ts index afd1a3bda6..f3116b93c7 100644 --- a/src/decorator/string/IsISBN.ts +++ b/src/decorator/string/IsISBN.ts @@ -11,6 +11,7 @@ export const IS_ISBN = 'isIsbn'; * If given value is not a string, then it returns false. */ export function isISBN(value: unknown, version?: IsISBNVersion): boolean { + /* eslint-disable-next-line @typescript-eslint/no-unnecessary-type-assertion */ const versionStr = version ? (`${version}` as '10' | '13') : undefined; return typeof value === 'string' && isIsbnValidator(value, versionStr); }