From: Johann-S Date: Thu, 27 Jul 2017 10:58:22 +0000 (+0200) Subject: Enable the `no-return-assign` rule. X-Git-Tag: v4.0.0-beta.2~322 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=6063b0dc659e7ba3a83cfc9502ad7872f8201a32;p=thirdparty%2Fbootstrap.git Enable the `no-return-assign` rule. --- diff --git a/js/.eslintrc.json b/js/.eslintrc.json index fdca9c1dd2..cc4e58ebd1 100644 --- a/js/.eslintrc.json +++ b/js/.eslintrc.json @@ -74,7 +74,7 @@ "no-param-reassign": "off", "no-proto": "error", "no-restricted-properties": "error", - "no-return-assign": "off", + "no-return-assign": "error", "no-return-await": "error", "no-script-url": "error", "no-self-compare": "error", diff --git a/js/src/popover.js b/js/src/popover.js index 7639e3e203..f5820ecbed 100644 --- a/js/src/popover.js +++ b/js/src/popover.js @@ -114,7 +114,8 @@ const Popover = (($) => { } getTipElement() { - return this.tip = this.tip || $(this.config.template)[0] + this.tip = this.tip || $(this.config.template)[0] + return this.tip } setContent() { diff --git a/js/src/tooltip.js b/js/src/tooltip.js index 721f044818..7dfe9dfc03 100644 --- a/js/src/tooltip.js +++ b/js/src/tooltip.js @@ -415,7 +415,8 @@ const Tooltip = (($) => { } getTipElement() { - return this.tip = this.tip || $(this.config.template)[0] + this.tip = this.tip || $(this.config.template)[0] + return this.tip } setContent() {