From d1af686a0dfb146ca378b5ebe1462de7322f2456 Mon Sep 17 00:00:00 2001 From: Fomafix Date: Sat, 21 Aug 2021 15:21:15 +0000 Subject: [PATCH] Remove eslint exception rule 'no-shadow' and rename variable Also fix JSDoc warnings. Change-Id: Idb2f15bd9ce134b17381bde1303a2e427c3056fb --- .eslintrc.json | 3 --- modules/ext.categoryTree/ext.categoryTree.js | 7 +++---- 2 files changed, 3 insertions(+), 7 deletions(-) diff --git a/.eslintrc.json b/.eslintrc.json index e67d292b..9812d33d 100644 --- a/.eslintrc.json +++ b/.eslintrc.json @@ -8,8 +8,5 @@ "env": { "browser": true, "commonjs": true - }, - "rules": { - "no-shadow": "warn" } } diff --git a/modules/ext.categoryTree/ext.categoryTree.js b/modules/ext.categoryTree/ext.categoryTree.js index ec8acf1f..ce3a674f 100644 --- a/modules/ext.categoryTree/ext.categoryTree.js +++ b/modules/ext.categoryTree/ext.categoryTree.js @@ -19,13 +19,12 @@ * http://www.gnu.org/copyleft/gpl.html * * @file - * @ingroup Extensions * @author Daniel Kinzler, brightbyte.de */ ( function () { var loadChildren, - data = require( './data.json' ); + config = require( './data.json' ); /** * Expands a given node (loading it's children if not loaded) @@ -65,7 +64,7 @@ /** * Handles clicks on the expand buttons, and calls the appropriate function * - * @context {Element} CategoryTreeToggle + * @this {Element} CategoryTreeToggle */ function handleNode() { var $link = $( this ); @@ -144,7 +143,7 @@ ctTitle = $link.attr( 'data-ct-title' ); ctMode = $linkParentCTTag.data( 'ct-mode' ); ctMode = typeof ctMode === 'number' ? ctMode : undefined; - ctOptions = $linkParentCTTag.attr( 'data-ct-options' ) || data.defaultCtOptions; + ctOptions = $linkParentCTTag.attr( 'data-ct-options' ) || config.defaultCtOptions; // Mode and options have defaults or fallbacks, title does not. // Don't make a request if there is no title.