From 49da878da2fcb34943d41704fb8ac9e32f3baba7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michael=20Vo=C5=99=C3=AD=C5=A1ek?= Date: Mon, 5 Dec 2022 16:03:15 +0100 Subject: [PATCH] fix no-multi-assign manually --- .eslintrc.js | 1 - src/definitions/behaviors/api.js | 3 ++- src/definitions/behaviors/form.js | 3 ++- src/definitions/globals/site.js | 3 ++- src/definitions/modules/flyout.js | 3 ++- src/definitions/modules/modal.js | 3 ++- src/definitions/modules/toast.js | 3 ++- 7 files changed, 12 insertions(+), 7 deletions(-) diff --git a/.eslintrc.js b/.eslintrc.js index daf1d93289..1841e207f0 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -122,7 +122,6 @@ module.exports = { 'no-continue': 'off', radix: 'off', 'prefer-spread': 'off', - 'no-multi-assign': 'off', 'no-new-func': 'off', // fixed with separate PR https://github.com/fomantic/Fomantic-UI/pull/2587 'no-bitwise': 'off', 'array-callback-return': 'off', diff --git a/src/definitions/behaviors/api.js b/src/definitions/behaviors/api.js index de1345c415..30fc8d6b0c 100644 --- a/src/definitions/behaviors/api.js +++ b/src/definitions/behaviors/api.js @@ -24,7 +24,7 @@ ? self : new Function('return this')(); - $.api = $.fn.api = function (parameters) { + $.fn.api = function (parameters) { var // use window context if none specified $allModules = isFunction(this) @@ -1066,6 +1066,7 @@ ? returnedValue : this; }; + $.api = $.fn.api; $.api.settings = { diff --git a/src/definitions/behaviors/form.js b/src/definitions/behaviors/form.js index 7de5dc97e3..73407d4bbe 100644 --- a/src/definitions/behaviors/form.js +++ b/src/definitions/behaviors/form.js @@ -1756,7 +1756,8 @@ // do nothing } else if (range.indexOf('..') == -1) { if (regExp.test(range)) { - min = max = range - 0; + min = range - 0; + max = min; } } else { parts = range.split('..', 2); diff --git a/src/definitions/globals/site.js b/src/definitions/globals/site.js index 7167718819..e6701adf11 100644 --- a/src/definitions/globals/site.js +++ b/src/definitions/globals/site.js @@ -13,7 +13,7 @@ return typeof obj === 'function' && typeof obj.nodeType !== 'number'; } - $.site = $.fn.site = function (parameters) { + $.fn.site = function (parameters) { var time = new Date().getTime(), performance = [], @@ -411,6 +411,7 @@ ? returnedValue : this; }; + $.site = $.fn.site; $.site.settings = { diff --git a/src/definitions/modules/flyout.js b/src/definitions/modules/flyout.js index bd30b0e2ee..7368e7cecb 100644 --- a/src/definitions/modules/flyout.js +++ b/src/definitions/modules/flyout.js @@ -21,7 +21,7 @@ ? self : new Function('return this')(); - $.flyout = $.fn.flyout = function (parameters) { + $.fn.flyout = function (parameters) { var $allModules = $(this), $window = $(window), @@ -1309,6 +1309,7 @@ ? returnedValue : this; }; + $.flyout = $.fn.flyout; $.fn.flyout.settings = { diff --git a/src/definitions/modules/modal.js b/src/definitions/modules/modal.js index bb444e6520..334f697415 100755 --- a/src/definitions/modules/modal.js +++ b/src/definitions/modules/modal.js @@ -21,7 +21,7 @@ ? self : new Function('return this')(); - $.modal = $.fn.modal = function (parameters) { + $.fn.modal = function (parameters) { var $allModules = $(this), $window = $(window), @@ -1314,6 +1314,7 @@ ? returnedValue : this; }; + $.modal = $.fn.modal; $.fn.modal.settings = { diff --git a/src/definitions/modules/toast.js b/src/definitions/modules/toast.js index eb8f56b3c5..21920b361f 100644 --- a/src/definitions/modules/toast.js +++ b/src/definitions/modules/toast.js @@ -21,7 +21,7 @@ ? self : new Function('return this')(); - $.toast = $.fn.toast = function (parameters) { + $.fn.toast = function (parameters) { var $allModules = $(this), moduleSelector = $allModules.selector || '', @@ -775,6 +775,7 @@ ? returnedValue : this; }; + $.toast = $.fn.toast; $.fn.toast.settings = {