From 951a67b43fa0da3caa9105b32fb02a6c229aa5d5 Mon Sep 17 00:00:00 2001 From: Daniel <50356015+danny007in@users.noreply.github.com> Date: Wed, 27 Jan 2021 12:25:54 +0530 Subject: [PATCH] eslint unicorn fix lint errors (#3363) --- .eslintrc.json | 1 + build/js/ControlSidebar.js | 4 ++-- dist/js/.eslintrc.json | 2 ++ 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/.eslintrc.json b/.eslintrc.json index 6b53f631c..d1640bc07 100644 --- a/.eslintrc.json +++ b/.eslintrc.json @@ -48,6 +48,7 @@ "unicorn/filename-case": "off", "unicorn/consistent-destructuring": "off", "unicorn/no-array-callback-reference": "off", + "unicorn/no-array-for-each": "off", "unicorn/no-for-loop": "off", "unicorn/no-null": "off", "unicorn/no-unused-properties": "error", diff --git a/build/js/ControlSidebar.js b/build/js/ControlSidebar.js index 40f47ae9d..9efa7353e 100644 --- a/build/js/ControlSidebar.js +++ b/build/js/ControlSidebar.js @@ -64,13 +64,13 @@ class ControlSidebar { collapse() { const $body = $('body') const $html = $('html') - const that = this + const { target } = this._config // Show the control sidebar if (this._config.controlsidebarSlide) { $html.addClass(CLASS_NAME_CONTROL_SIDEBAR_ANIMATE) $body.removeClass(CLASS_NAME_CONTROL_SIDEBAR_SLIDE).delay(300).queue(function () { - $(that._config.target).hide() + $(target).hide() $html.removeClass(CLASS_NAME_CONTROL_SIDEBAR_ANIMATE) $(this).dequeue() }) diff --git a/dist/js/.eslintrc.json b/dist/js/.eslintrc.json index a042482d1..c6b4b3fca 100644 --- a/dist/js/.eslintrc.json +++ b/dist/js/.eslintrc.json @@ -35,12 +35,14 @@ "never" ], "strict": "error", + "unicorn/no-array-for-each": "off", "unicorn/no-for-loop": "off", "unicorn/no-null": "off", "unicorn/prefer-dataset": "off", "unicorn/prefer-includes": "off", "unicorn/prefer-node-append": "off", "unicorn/prefer-query-selector": "off", + "unicorn/prefer-spread": "off", "unicorn/prevent-abbreviations": "off" } }