From 8e841ef9f67b6c4ac50fdf4a25fe509d5920f0a9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Attila=20Ol=C3=A1h?= Date: Sat, 20 Nov 2021 12:21:17 +0100 Subject: [PATCH] refactor: ignore linter error --- src/decorator/string/IsIP.ts | 1 + src/decorator/string/IsISBN.ts | 1 + 2 files changed, 2 insertions(+) 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); }