From 3b618995f89ac0001f972b96f7e07d05a389e63d Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 25 Jan 2021 03:08:42 +0000 Subject: [PATCH 1/2] Bump eslint-plugin-unicorn from 26.0.1 to 27.0.0 Bumps [eslint-plugin-unicorn](https://github.com/sindresorhus/eslint-plugin-unicorn) from 26.0.1 to 27.0.0. - [Release notes](https://github.com/sindresorhus/eslint-plugin-unicorn/releases) - [Commits](https://github.com/sindresorhus/eslint-plugin-unicorn/compare/v26.0.1...v27.0.0) Signed-off-by: dependabot[bot] --- package-lock.json | 31 +++++++------------------------ package.json | 2 +- 2 files changed, 8 insertions(+), 25 deletions(-) diff --git a/package-lock.json b/package-lock.json index c49fc4d26..db8a90dca 100644 --- a/package-lock.json +++ b/package-lock.json @@ -4136,16 +4136,6 @@ } } }, - "eslint-ast-utils": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/eslint-ast-utils/-/eslint-ast-utils-1.1.0.tgz", - "integrity": "sha512-otzzTim2/1+lVrlH19EfQQJEhVJSu0zOb9ygb3iapN6UlyaDtyRq4b5U1FuW0v1lRa9Fp/GJyHkSwm6NqABgCA==", - "dev": true, - "requires": { - "lodash.get": "^4.4.2", - "lodash.zip": "^4.2.0" - } - }, "eslint-config-xo": { "version": "0.34.0", "resolved": "https://registry.npmjs.org/eslint-config-xo/-/eslint-config-xo-0.34.0.tgz", @@ -4358,21 +4348,20 @@ } }, "eslint-plugin-unicorn": { - "version": "26.0.1", - "resolved": "https://registry.npmjs.org/eslint-plugin-unicorn/-/eslint-plugin-unicorn-26.0.1.tgz", - "integrity": "sha512-SWgF9sIVY74zqkkSN2dclSCqRfocWSUGD0haC0NX2oRfmdp9p8dQvJYkYSQePaCyssPUE/pqpsIEEZNTh8crUA==", + "version": "27.0.0", + "resolved": "https://registry.npmjs.org/eslint-plugin-unicorn/-/eslint-plugin-unicorn-27.0.0.tgz", + "integrity": "sha512-uUvlueTa4SpkvLjbkqx08JbB0tY6XxOAa8vlfwbTzITfVNy3go3QzPCus49fO5M/mfooOuraIDVkaqan/pLAHg==", "dev": true, "requires": { "ci-info": "^2.0.0", "clean-regexp": "^1.0.0", - "eslint-ast-utils": "^1.1.0", "eslint-template-visitor": "^2.2.2", "eslint-utils": "^2.1.0", "import-modules": "^2.1.0", "lodash": "^4.17.20", "pluralize": "^8.0.0", "read-pkg-up": "^7.0.1", - "regexp-tree": "^0.1.21", + "regexp-tree": "^0.1.22", "reserved-words": "^0.1.2", "safe-regex": "^2.1.1", "semver": "^7.3.4" @@ -6496,12 +6485,6 @@ "integrity": "sha1-7dFMgk4sycHgsKG0K7UhBRakJDg=", "dev": true }, - "lodash.zip": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/lodash.zip/-/lodash.zip-4.2.0.tgz", - "integrity": "sha1-7GZi5IlkCO1KtsVCo5kLcswIACA=", - "dev": true - }, "log-symbols": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/log-symbols/-/log-symbols-4.0.0.tgz", @@ -8515,9 +8498,9 @@ } }, "regexp-tree": { - "version": "0.1.21", - "resolved": "https://registry.npmjs.org/regexp-tree/-/regexp-tree-0.1.21.tgz", - "integrity": "sha512-kUUXjX4AnqnR8KRTCrayAo9PzYMRKmVoGgaz2tBuz0MF3g1ZbGebmtW0yFHfFK9CmBjQKeYIgoL22pFLBJY7sw==", + "version": "0.1.23", + "resolved": "https://registry.npmjs.org/regexp-tree/-/regexp-tree-0.1.23.tgz", + "integrity": "sha512-+7HWfb4Bvu8Rs2eQTUIpX9I/PlQkYOuTNbRpKLJlQpSgwSkzFYh+pUj0gtvglnOZLKB6YgnIgRuJ2/IlpL48qw==", "dev": true }, "regexp.prototype.flags": { diff --git a/package.json b/package.json index cce48d40f..8dec97827 100644 --- a/package.json +++ b/package.json @@ -142,7 +142,7 @@ "eslint-config-xo": "^0.34.0", "eslint-plugin-compat": "^3.9.0", "eslint-plugin-import": "^2.22.1", - "eslint-plugin-unicorn": "^26.0.1", + "eslint-plugin-unicorn": "^27.0.0", "node-sass": "^5.0.0", "node-sass-package-importer": "^5.3.2", "nodemon": "^2.0.7", 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 2/2] 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" } }