From d78e6316623c2271facd2d877dba4d036b74319e Mon Sep 17 00:00:00 2001 From: Michael Kriese <michael.kriese@visualon.de> Date: Tue, 12 Nov 2024 23:47:27 +0100 Subject: [PATCH] fix: drop unused variables (#203) --- lib/index.ts | 2 +- lib/ruby/requirement.ts | 4 ++-- lib/ruby/version.ts | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/index.ts b/lib/index.ts index 41e394f..5782c3c 100644 --- a/lib/index.ts +++ b/lib/index.ts @@ -71,7 +71,7 @@ export function satisfies(version: string, range: string): boolean { const v = new Version(version); const r = new Requirement(...range.split(/\s*,\s*/)); return r.isSatisfiedBy(v); - } catch (_) { + } catch { return false; } } diff --git a/lib/ruby/requirement.ts b/lib/ruby/requirement.ts index f98d1a9..82498d0 100644 --- a/lib/ruby/requirement.ts +++ b/lib/ruby/requirement.ts @@ -124,7 +124,7 @@ export class Requirement { if (input instanceof Version) return new Requirement(input); try { return new Requirement(copystr(input.toString())); - } catch (_) { + } catch { return Requirement.default(); } } @@ -185,7 +185,7 @@ export class Requirement { let objStr; try { objStr = copystr(obj.toString()); - } catch (_) { + } catch { err(); } diff --git a/lib/ruby/version.ts b/lib/ruby/version.ts index 77d9285..334ed1e 100644 --- a/lib/ruby/version.ts +++ b/lib/ruby/version.ts @@ -198,7 +198,7 @@ export class Version { let versionStr; try { versionStr = copystr(version.toString()); - } catch (_) { + } catch { return false; }