From 59bf9873da82ae8ee70dad2e2945b38990af827a Mon Sep 17 00:00:00 2001 From: wearrrrr Date: Mon, 2 Sep 2024 14:09:13 -0500 Subject: [PATCH] @typescript-eslint/no-unused-vars --- .eslintrc.json | 11 +++++++++-- src/client/shared/sourcemaps.ts | 4 ++-- 2 files changed, 11 insertions(+), 4 deletions(-) diff --git a/.eslintrc.json b/.eslintrc.json index e6073be..2b2be42 100644 --- a/.eslintrc.json +++ b/.eslintrc.json @@ -5,7 +5,6 @@ "rules": { "no-await-in-loop": "warn", "no-unused-labels": "warn", - "no-unused-vars": "off", "quotes": ["error", "double"], "max-lines-per-function": [ "error", @@ -25,6 +24,14 @@ "no-unreachable": "warn", "no-undef": "off", "@typescript-eslint/no-explicit-any": "off", - "@typescript-eslint/ban-ts-comment": "off" + "@typescript-eslint/ban-ts-comment": "off", + "@typescript-eslint/no-unused-vars": [ + "warn", + { + "argsIgnorePattern": "^_", + "varsIgnorePattern": "^_", + "caughtErrorsIgnorePattern": "^_" + } + ] } } diff --git a/src/client/shared/sourcemaps.ts b/src/client/shared/sourcemaps.ts index a3b130e..edc6b1a 100644 --- a/src/client/shared/sourcemaps.ts +++ b/src/client/shared/sourcemaps.ts @@ -6,7 +6,7 @@ const sourcemaps: Record = {}; export const enabled = () => self.$scramjet.config.flags.sourcemaps; -let t = 0; +let _t = 0; export default function (client: ScramjetClient, self: Self) { // every script will push a sourcemap Object.defineProperty(self, "$scramjet$pushsourcemap", { @@ -54,7 +54,7 @@ export default function (client: ScramjetClient, self: Self) { const maps = sourcemaps[tag]; const relevantRewrites = maps.filter( - ([str, start, end]) => + ([_str, start, end]) => start >= absindex && end <= absindex + stringified.length );