From 78983571152bb62253f05d7202d97fdaa97a1667 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 29 Dec 2020 07:17:26 +0000 Subject: [PATCH 1/2] Bump eslint-plugin-unicorn from 23.0.0 to 25.0.0 Bumps [eslint-plugin-unicorn](https://github.com/sindresorhus/eslint-plugin-unicorn) from 23.0.0 to 25.0.0. - [Release notes](https://github.com/sindresorhus/eslint-plugin-unicorn/releases) - [Commits](https://github.com/sindresorhus/eslint-plugin-unicorn/compare/v23.0.0...v25.0.0) Signed-off-by: dependabot[bot] --- package-lock.json | 41 ++++++++++++++++++++++++++--------------- package.json | 2 +- 2 files changed, 27 insertions(+), 16 deletions(-) diff --git a/package-lock.json b/package-lock.json index d29d2d7b1..583a7af36 100644 --- a/package-lock.json +++ b/package-lock.json @@ -4906,9 +4906,9 @@ } }, "eslint-plugin-unicorn": { - "version": "23.0.0", - "resolved": "https://registry.npmjs.org/eslint-plugin-unicorn/-/eslint-plugin-unicorn-23.0.0.tgz", - "integrity": "sha512-Vabo3cjl6cjyhcf+76CdQEY6suOFzK0Xh3xo0uL9VDYrDJP5+B6PjV0tHTYm82WZmFWniugFJM3ywHSNYTi/ZQ==", + "version": "25.0.0", + "resolved": "https://registry.npmjs.org/eslint-plugin-unicorn/-/eslint-plugin-unicorn-25.0.0.tgz", + "integrity": "sha512-RuhPUrsKuRj0YGz8lMuh5Z5DJoC/hmUR6omvlquLlY6SYY+oZXMFyp83ckpqLMhbafqUx+JttWOPOjfP4W9Y+Q==", "dev": true, "requires": { "ci-info": "^2.0.0", @@ -4923,7 +4923,7 @@ "regexp-tree": "^0.1.21", "reserved-words": "^0.1.2", "safe-regex": "^2.1.1", - "semver": "^7.3.2" + "semver": "^7.3.4" }, "dependencies": { "find-up": { @@ -5001,10 +5001,13 @@ } }, "semver": { - "version": "7.3.2", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.2.tgz", - "integrity": "sha512-OrOb32TeeambH6UrhtShmF7CRDqhL6/5XpPNp2DuRH6+9QLw/orhp72j87v8Qa1ScDkvrrBNpZcDejAirJmfXQ==", - "dev": true + "version": "7.3.4", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.4.tgz", + "integrity": "sha512-tCfb2WLjqFAtXn4KEdxIhalnRtoKFN7nAwj0B3ZXCbQloV2tq5eDbcTmT68JJD3nRJq24/XgxtQKFIpQdtvmVw==", + "dev": true, + "requires": { + "lru-cache": "^6.0.0" + } } } }, @@ -5019,15 +5022,23 @@ } }, "eslint-template-visitor": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/eslint-template-visitor/-/eslint-template-visitor-2.2.1.tgz", - "integrity": "sha512-q3SxoBXz0XjPGkUpwGVAwIwIPIxzCAJX1uwfVc8tW3v7u/zS7WXNH3I2Mu2MDz2NgSITAyKLRaQFPHu/iyKxDQ==", + "version": "2.2.2", + "resolved": "https://registry.npmjs.org/eslint-template-visitor/-/eslint-template-visitor-2.2.2.tgz", + "integrity": "sha512-SkcLjzKw3JjKTWHacRDeLBa2gxb600zbCKTkXj/V97QnZ9yxkknoPL8vc8PFueqbFXP7mYNTQzjCjcMpTRdRaA==", "dev": true, "requires": { "babel-eslint": "^10.1.0", - "eslint-visitor-keys": "^1.3.0", + "eslint-visitor-keys": "^2.0.0", "esquery": "^1.3.1", "multimap": "^1.1.0" + }, + "dependencies": { + "eslint-visitor-keys": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-2.0.0.tgz", + "integrity": "sha512-QudtT6av5WXels9WjIM7qz1XD1cWGvX4gGXvp/zBn9nXG02D0utdU3Em2m/QjTnrsk6bBjmCygl3rmj118msQQ==", + "dev": true + } } }, "eslint-utils": { @@ -6276,9 +6287,9 @@ "dev": true }, "import-modules": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/import-modules/-/import-modules-2.0.0.tgz", - "integrity": "sha512-iczM/v9drffdNnABOKwj0f9G3cFDon99VcG1mxeBsdqnbd+vnQ5c2uAiCHNQITqFTOPaEvwg3VjoWCur0uHLEw==", + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/import-modules/-/import-modules-2.1.0.tgz", + "integrity": "sha512-8HEWcnkbGpovH9yInoisxaSoIg9Brbul+Ju3Kqe2UsYDUBJD/iQjSgEj0zPcTDPKfPp2fs5xlv1i+JSye/m1/A==", "dev": true }, "imurmurhash": { diff --git a/package.json b/package.json index 30ede6bbf..53934eac0 100644 --- a/package.json +++ b/package.json @@ -140,7 +140,7 @@ "eslint-config-xo": "^0.33.1", "eslint-plugin-compat": "^3.9.0", "eslint-plugin-import": "^2.22.1", - "eslint-plugin-unicorn": "^23.0.0", + "eslint-plugin-unicorn": "^25.0.0", "node-sass": "^5.0.0", "node-sass-package-importer": "^5.3.2", "nodemon": "^2.0.6", From 1ce6165330aafd1836c20875c60780b0d16d0497 Mon Sep 17 00:00:00 2001 From: Daniel <50356015+danny007in@users.noreply.github.com> Date: Wed, 30 Dec 2020 13:04:17 +0530 Subject: [PATCH 2/2] Fixed Errors of PR - Bump eslint-plugin-unicorn from 23.0.0 to 25.0.0 (#3267) Fixed Lint Errorshttps://github.com/ColorlibHQ/AdminLTE/pull/3265 --- .eslintrc.json | 8 ++++---- build/js/CardRefresh.js | 3 +-- build/js/ControlSidebar.js | 6 ++---- build/js/Dropdown.js | 3 +-- build/js/PushMenu.js | 12 ++++-------- build/js/SidebarSearch.js | 6 +++--- 6 files changed, 15 insertions(+), 23 deletions(-) diff --git a/.eslintrc.json b/.eslintrc.json index ba58b7b20..8daf43326 100644 --- a/.eslintrc.json +++ b/.eslintrc.json @@ -47,14 +47,14 @@ ], "unicorn/filename-case": "off", "unicorn/import-index": "off", - "unicorn/no-fn-reference-in-iterator": "off", + "unicorn/no-array-callback-reference": "off", "unicorn/no-for-loop": "off", "unicorn/no-null": "off", "unicorn/no-unused-properties": "error", - "unicorn/prefer-dataset": "off", + "unicorn/prefer-dom-node-dataset": "off", "unicorn/prefer-includes": "off", - "unicorn/prefer-node-append": "off", - "unicorn/prefer-node-remove": "off", + "unicorn/prefer-dom-node-append": "off", + "unicorn/prefer-dom-node-remove": "off", "unicorn/prefer-number-properties": "off", "unicorn/prefer-optional-catch-binding": "off", "unicorn/prefer-query-selector": "off", diff --git a/build/js/CardRefresh.js b/build/js/CardRefresh.js index d0671edc1..f3240c4a3 100644 --- a/build/js/CardRefresh.js +++ b/build/js/CardRefresh.js @@ -36,8 +36,7 @@ const Default = { loadOnInit: true, responseType: '', overlayTemplate: '
', - onLoadStart() { - }, + onLoadStart() {}, onLoadDone(response) { return response } diff --git a/build/js/ControlSidebar.js b/build/js/ControlSidebar.js index eaa62ce7f..40f47ae9d 100644 --- a/build/js/ControlSidebar.js +++ b/build/js/ControlSidebar.js @@ -253,10 +253,8 @@ class ControlSidebar { let sidebarHeight = heights.window - heights.header - if (this._isFooterFixed()) { - if ($(SELECTOR_FOOTER).css('position') === 'fixed') { - sidebarHeight = heights.window - heights.header - heights.footer - } + if (this._isFooterFixed() && $(SELECTOR_FOOTER).css('position') === 'fixed') { + sidebarHeight = heights.window - heights.header - heights.footer } $controlSidebar.css('height', sidebarHeight) diff --git a/build/js/Dropdown.js b/build/js/Dropdown.js index 072163b9d..b67590a27 100644 --- a/build/js/Dropdown.js +++ b/build/js/Dropdown.js @@ -25,8 +25,7 @@ const CLASS_NAME_DROPDOWN_RIGHT = 'dropdown-menu-right' const CLASS_NAME_DROPDOWN_SUBMENU = 'dropdown-submenu' // TODO: this is unused; should be removed along with the extend? -const Default = { -} +const Default = {} /** * Class Definition diff --git a/build/js/PushMenu.js b/build/js/PushMenu.js index 346e8a5c5..b4ca1b349 100644 --- a/build/js/PushMenu.js +++ b/build/js/PushMenu.js @@ -58,10 +58,8 @@ class PushMenu { expand() { const $bodySelector = $(SELECTOR_BODY) - if (this._options.autoCollapseSize) { - if ($(window).width() <= this._options.autoCollapseSize) { - $bodySelector.addClass(CLASS_NAME_OPEN) - } + if (this._options.autoCollapseSize && $(window).width() <= this._options.autoCollapseSize) { + $bodySelector.addClass(CLASS_NAME_OPEN) } $bodySelector.addClass(CLASS_NAME_IS_OPENING).removeClass(`${CLASS_NAME_COLLAPSED} ${CLASS_NAME_CLOSED}`).delay(50).queue(function () { @@ -79,10 +77,8 @@ class PushMenu { collapse() { const $bodySelector = $(SELECTOR_BODY) - if (this._options.autoCollapseSize) { - if ($(window).width() <= this._options.autoCollapseSize) { - $bodySelector.removeClass(CLASS_NAME_OPEN).addClass(CLASS_NAME_CLOSED) - } + if (this._options.autoCollapseSize && $(window).width() <= this._options.autoCollapseSize) { + $bodySelector.removeClass(CLASS_NAME_OPEN).addClass(CLASS_NAME_CLOSED) } $bodySelector.addClass(CLASS_NAME_COLLAPSED) diff --git a/build/js/SidebarSearch.js b/build/js/SidebarSearch.js index 2949e239b..3b6fa0456 100644 --- a/build/js/SidebarSearch.js +++ b/build/js/SidebarSearch.js @@ -61,17 +61,17 @@ class SidebarSearch { // Public init() { - if ($(SELECTOR_DATA_WIDGET).length == 0) { + if ($(SELECTOR_DATA_WIDGET).length === 0) { return } - if ($(SELECTOR_DATA_WIDGET).next(SELECTOR_SEARCH_RESULTS).length == 0) { + if ($(SELECTOR_DATA_WIDGET).next(SELECTOR_SEARCH_RESULTS).length === 0) { $(SELECTOR_DATA_WIDGET).after( $('
', { class: CLASS_NAME_SEARCH_RESULTS }) ) } - if ($(SELECTOR_SEARCH_RESULTS).children(SELECTOR_SEARCH_LIST_GROUP).length == 0) { + if ($(SELECTOR_SEARCH_RESULTS).children(SELECTOR_SEARCH_LIST_GROUP).length === 0) { $(SELECTOR_SEARCH_RESULTS).append( $('
', { class: CLASS_NAME_LIST_GROUP }) )