From 51934a32488a2e2157a935bbabe86d35cecb62d1 Mon Sep 17 00:00:00 2001 From: Caleb Evans Date: Tue, 4 Jun 2024 18:40:11 -0700 Subject: [PATCH] Check for unused parameters/variables Except for those prefixed with an underscore (_). --- .eslintrc.json | 6 +++++- src/jcanvas.ts | 2 +- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/.eslintrc.json b/.eslintrc.json index 62a6eda..4b370a5 100644 --- a/.eslintrc.json +++ b/.eslintrc.json @@ -20,6 +20,10 @@ "@typescript-eslint/no-explicit-any": "off", "@typescript-eslint/no-this-alias": "off", "@typescript-eslint/ban-types": "off", - "no-constant-condition": "off" + "no-constant-condition": "off", + "no-unused-vars": [ + "error", + { "argsIgnorePattern": "^_", "varsIgnorePattern": "^_" } + ] } } diff --git a/src/jcanvas.ts b/src/jcanvas.ts index f431146..5e548d5 100644 --- a/src/jcanvas.ts +++ b/src/jcanvas.ts @@ -1779,7 +1779,7 @@ function _addLayer( canvas: HTMLCanvasElement, params: JCanvasObject, args?: Partial, - method?: (args: JCanvasObject) => JQuery + method?: (_args: JCanvasObject) => JQuery ): JCanvasObject { const layer: JCanvasObject = params._layer ? (args as JCanvasLayer) : params;