From 654ad02d8ad90f98c35ead5a1d3e47fe09c3e9e6 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 18 Jan 2021 10:01:39 +0200 Subject: [PATCH] Bump eslint-plugin-unicorn from 25.0.1 to 26.0.1 (#3323) * Bump eslint-plugin-unicorn from 25.0.1 to 26.0.1 Bumps [eslint-plugin-unicorn](https://github.com/sindresorhus/eslint-plugin-unicorn) from 25.0.1 to 26.0.1. - [Release notes](https://github.com/sindresorhus/eslint-plugin-unicorn/releases) - [Commits](https://github.com/sindresorhus/eslint-plugin-unicorn/compare/v25.0.1...v26.0.1) Signed-off-by: dependabot[bot] * Clean up .eslintrc.json * Autofix * Temporarily disable `unicorn/consistent-destructuring` Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: XhmikosR --- .eslintrc.json | 6 +++--- build/js/CardRefresh.js | 2 +- build/js/CardWidget.js | 2 +- build/js/ExpandableTable.js | 2 +- build/js/Fullscreen.js | 2 +- build/js/IFrame.js | 2 +- build/js/PushMenu.js | 2 +- build/js/SidebarSearch.js | 2 +- package-lock.json | 10 +++++----- package.json | 2 +- 10 files changed, 16 insertions(+), 16 deletions(-) diff --git a/.eslintrc.json b/.eslintrc.json index 8daf43326..6b53f631c 100644 --- a/.eslintrc.json +++ b/.eslintrc.json @@ -46,15 +46,15 @@ "never" ], "unicorn/filename-case": "off", - "unicorn/import-index": "off", + "unicorn/consistent-destructuring": "off", "unicorn/no-array-callback-reference": "off", "unicorn/no-for-loop": "off", "unicorn/no-null": "off", "unicorn/no-unused-properties": "error", - "unicorn/prefer-dom-node-dataset": "off", - "unicorn/prefer-includes": "off", "unicorn/prefer-dom-node-append": "off", + "unicorn/prefer-dom-node-dataset": "off", "unicorn/prefer-dom-node-remove": "off", + "unicorn/prefer-includes": "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 f3240c4a3..734116430 100644 --- a/build/js/CardRefresh.js +++ b/build/js/CardRefresh.js @@ -111,7 +111,7 @@ class CardRefresh { $(this).data(DATA_KEY, typeof config === 'string' ? data : config) } - if (typeof config === 'string' && config.match(/load/)) { + if (typeof config === 'string' && /load/.test(config)) { data[config]() } else { data._init($(this)) diff --git a/build/js/CardWidget.js b/build/js/CardWidget.js index 1249a6527..c4b113da7 100644 --- a/build/js/CardWidget.js +++ b/build/js/CardWidget.js @@ -186,7 +186,7 @@ class CardWidget { $(this).data(DATA_KEY, typeof config === 'string' ? data : config) } - if (typeof config === 'string' && config.match(/collapse|expand|remove|toggle|maximize|minimize|toggleMaximize/)) { + if (typeof config === 'string' && /collapse|expand|remove|toggle|maximize|minimize|toggleMaximize/.test(config)) { data[config]() } else if (typeof config === 'object') { data._init($(this)) diff --git a/build/js/ExpandableTable.js b/build/js/ExpandableTable.js index 1094f9e35..f9d5eb337 100644 --- a/build/js/ExpandableTable.js +++ b/build/js/ExpandableTable.js @@ -81,7 +81,7 @@ class ExpandableTable { $(this).data(DATA_KEY, data) } - if (typeof operation === 'string' && operation.match(/init|toggleRow/)) { + if (typeof operation === 'string' && /init|toggleRow/.test(operation)) { data[operation]() } }) diff --git a/build/js/Fullscreen.js b/build/js/Fullscreen.js index 4551f3e4c..8d4624a14 100644 --- a/build/js/Fullscreen.js +++ b/build/js/Fullscreen.js @@ -86,7 +86,7 @@ class Fullscreen { $(this).data(DATA_KEY, typeof config === 'object' ? config : data) - if (typeof config === 'string' && config.match(/toggle|fullscreen|windowed/)) { + if (typeof config === 'string' && /toggle|fullscreen|windowed/.test(config)) { plugin[config]() } else { plugin.init() diff --git a/build/js/IFrame.js b/build/js/IFrame.js index 1984be76e..851e67869 100644 --- a/build/js/IFrame.js +++ b/build/js/IFrame.js @@ -326,7 +326,7 @@ class IFrame { $(this).data(DATA_KEY, data) } - if (typeof operation === 'string' && operation.match(/createTab|openTabSidebar|switchTab|removeActiveTab/)) { + if (typeof operation === 'string' && /createTab|openTabSidebar|switchTab|removeActiveTab/.test(operation)) { data[operation](...args) } } diff --git a/build/js/PushMenu.js b/build/js/PushMenu.js index b4ca1b349..04497d542 100644 --- a/build/js/PushMenu.js +++ b/build/js/PushMenu.js @@ -180,7 +180,7 @@ class PushMenu { $(this).data(DATA_KEY, data) } - if (typeof operation === 'string' && operation.match(/collapse|expand|toggle/)) { + if (typeof operation === 'string' && /collapse|expand|toggle/.test(operation)) { data[operation]() } }) diff --git a/build/js/SidebarSearch.js b/build/js/SidebarSearch.js index 3b6fa0456..5c7d53447 100644 --- a/build/js/SidebarSearch.js +++ b/build/js/SidebarSearch.js @@ -219,7 +219,7 @@ class SidebarSearch { $(this).data(DATA_KEY, typeof config === 'object' ? config : data) - if (typeof config === 'string' && config.match(/init|toggle|close|open|search/)) { + if (typeof config === 'string' && /init|toggle|close|open|search/.test(config)) { plugin[config]() } else { plugin.init() diff --git a/package-lock.json b/package-lock.json index fcbb15b18..51913b47b 100644 --- a/package-lock.json +++ b/package-lock.json @@ -4141,17 +4141,17 @@ } }, "eslint-plugin-unicorn": { - "version": "25.0.1", - "resolved": "https://registry.npmjs.org/eslint-plugin-unicorn/-/eslint-plugin-unicorn-25.0.1.tgz", - "integrity": "sha512-MEyEWoyou/qhJH6rEER9YHACtCsQT+eewc6Fdxbi2eiTvsGrBR8JZMA6qaeof3oMQeRxOpaERoBKzU7R5c4A/w==", + "version": "26.0.1", + "resolved": "https://registry.npmjs.org/eslint-plugin-unicorn/-/eslint-plugin-unicorn-26.0.1.tgz", + "integrity": "sha512-SWgF9sIVY74zqkkSN2dclSCqRfocWSUGD0haC0NX2oRfmdp9p8dQvJYkYSQePaCyssPUE/pqpsIEEZNTh8crUA==", "dev": true, "requires": { "ci-info": "^2.0.0", "clean-regexp": "^1.0.0", "eslint-ast-utils": "^1.1.0", - "eslint-template-visitor": "^2.2.1", + "eslint-template-visitor": "^2.2.2", "eslint-utils": "^2.1.0", - "import-modules": "^2.0.0", + "import-modules": "^2.1.0", "lodash": "^4.17.20", "pluralize": "^8.0.0", "read-pkg-up": "^7.0.1", diff --git a/package.json b/package.json index 91bc148ad..35f1a105b 100644 --- a/package.json +++ b/package.json @@ -140,7 +140,7 @@ "eslint-config-xo": "^0.34.0", "eslint-plugin-compat": "^3.9.0", "eslint-plugin-import": "^2.22.1", - "eslint-plugin-unicorn": "^25.0.1", + "eslint-plugin-unicorn": "^26.0.1", "node-sass": "^5.0.0", "node-sass-package-importer": "^5.3.2", "nodemon": "^2.0.7",