Browse Source

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] <support@github.com>

* 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 <xhmikosr@gmail.com>
dependabot[bot] 4 years ago
parent
commit
654ad02d8a

+ 3 - 3
.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",

+ 1 - 1
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))

+ 1 - 1
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))

+ 1 - 1
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]()
       }
     })

+ 1 - 1
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()

+ 1 - 1
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)
     }
   }

+ 1 - 1
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]()
       }
     })

+ 1 - 1
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()

+ 5 - 5
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",

+ 1 - 1
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",