aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorOleg Gaidarenko <markelog@gmail.com>2016-07-09 00:46:58 +0300
committerOleg Gaidarenko <markelog@gmail.com>2016-07-09 00:49:43 +0300
commit522f546d9607022a312cc30f8699c5282469f9a1 (patch)
tree40cb1e4e81ef38ba21a8f731f0148f67c71ff558 /src
parent93f706200c6101df137469ba2e0d965e93508991 (diff)
downloadjquery-522f546d9607022a312cc30f8699c5282469f9a1.tar.gz
jquery-522f546d9607022a312cc30f8699c5282469f9a1.zip
Build: More ESLint related changes
Diffstat (limited to 'src')
-rw-r--r--src/attributes/prop.js8
-rw-r--r--src/css/showHide.js2
2 files changed, 9 insertions, 1 deletions
diff --git a/src/attributes/prop.js b/src/attributes/prop.js
index 2f73a8508..b69177adf 100644
--- a/src/attributes/prop.js
+++ b/src/attributes/prop.js
@@ -88,9 +88,14 @@ jQuery.extend( {
// on the option
// The getter ensures a default option is selected
// when in an optgroup
+// eslint rule "no-unused-expressions" is disabled for this code
+// since it considers such accessions noop
if ( !support.optSelected ) {
jQuery.propHooks.selected = {
get: function( elem ) {
+
+ /* eslint no-unused-expressions: "off" */
+
var parent = elem.parentNode;
if ( parent && parent.parentNode ) {
parent.parentNode.selectedIndex;
@@ -98,6 +103,9 @@ if ( !support.optSelected ) {
return null;
},
set: function( elem ) {
+
+ /* eslint no-unused-expressions: "off" */
+
var parent = elem.parentNode;
if ( parent ) {
parent.selectedIndex;
diff --git a/src/css/showHide.js b/src/css/showHide.js
index 11b1479d9..3eeafef11 100644
--- a/src/css/showHide.js
+++ b/src/css/showHide.js
@@ -18,7 +18,7 @@ function getDefaultDisplay( elem ) {
return display;
}
- temp = doc.body.appendChild( doc.createElement( nodeName ) ),
+ temp = doc.body.appendChild( doc.createElement( nodeName ) );
display = jQuery.css( temp, "display" );
temp.parentNode.removeChild( temp );