From 5c1553bdda1ebd63e8cceb95f22a3734e5dd3bbd Mon Sep 17 00:00:00 2001 From: Joachim Van Herwegen Date: Tue, 12 Mar 2024 14:46:48 +0100 Subject: [PATCH] refactor: Enable no-unnecessary-type-arguments rule --- eslint/typed.js | 1 + src/storage/patch/N3Patcher.ts | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/eslint/typed.js b/eslint/typed.js index b2214102e..bf925de74 100644 --- a/eslint/typed.js +++ b/eslint/typed.js @@ -12,6 +12,7 @@ const typeAwareRules = { 'ts/no-implied-eval': 'error', 'ts/no-misused-promises': 'error', 'ts/no-throw-literal': 'error', + 'ts/no-unnecessary-type-arguments': 'error', 'ts/no-unnecessary-type-assertion': 'error', 'ts/no-unsafe-argument': 'error', 'ts/no-unsafe-assignment': 'error', diff --git a/src/storage/patch/N3Patcher.ts b/src/storage/patch/N3Patcher.ts index 47f47da29..f04bee784 100644 --- a/src/storage/patch/N3Patcher.ts +++ b/src/storage/patch/N3Patcher.ts @@ -140,9 +140,9 @@ export class N3Patcher extends RepresentationPatcher { } // Apply bindings to deletes/inserts - deletes = deletes.map((quad): Quad => mapTerms(quad, (term): Term => + deletes = deletes.map((quad): Quad => mapTerms(quad, (term): Term => term.termType === 'Variable' ? bindings[0].get(term)! : term)); - inserts = inserts.map((quad): Quad => mapTerms(quad, (term): Term => + inserts = inserts.map((quad): Quad => mapTerms(quad, (term): Term => term.termType === 'Variable' ? bindings[0].get(term)! : term)); }