Jforrester has uploaded a new change for review. (
https://gerrit.wikimedia.org/r/344674 )
Change subject: build: Enable eslint rule 'eqeqeq' and make pass
......................................................................
build: Enable eslint rule 'eqeqeq' and make pass
Change-Id: I57907da2b12fcd36c76d20ce2294ff462d5f49e8
---
M .eslintrc.json
M resources/infrastructure/bannereditor.js
M resources/infrastructure/bannermanager.js
M resources/infrastructure/centralnotice.js
4 files changed, 4 insertions(+), 5 deletions(-)
git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/CentralNotice
refs/changes/74/344674/1
diff --git a/.eslintrc.json b/.eslintrc.json
index f42e620..2f8c9a1 100644
--- a/.eslintrc.json
+++ b/.eslintrc.json
@@ -11,7 +11,6 @@
"mediaWiki": false
},
"rules": {
- "eqeqeq": 0,
"no-multi-spaces": 0,
"no-undef": 0,
"no-unneeded-ternary": 0,
diff --git a/resources/infrastructure/bannereditor.js
b/resources/infrastructure/bannereditor.js
index 183bc4f..3902d43 100644
--- a/resources/infrastructure/bannereditor.js
+++ b/resources/infrastructure/bannereditor.js
@@ -187,7 +187,7 @@
bannerField.focus();
sel = document.selection.createRange();
sel.text = buttonValue;
- } else if ( bannerField.selectionStart ||
bannerField.selectionStart == '0' ) {
+ } else if ( bannerField.selectionStart ||
bannerField.selectionStart === '0' ) {
// Mozilla support
startPos = bannerField.selectionStart;
endPos = bannerField.selectionEnd;
diff --git a/resources/infrastructure/bannermanager.js
b/resources/infrastructure/bannermanager.js
index fccc5e8..19c7de0 100644
--- a/resources/infrastructure/bannermanager.js
+++ b/resources/infrastructure/bannermanager.js
@@ -188,7 +188,7 @@
var selectAllCheck = $( '#mw-input-wpselectAllBanners'
),
deleteButton = $( '
#mw-input-wpdeleteSelectedBanners' );
- if ( bm.selectedItemCount == bm.totalSelectableItems ) {
+ if ( bm.selectedItemCount === bm.totalSelectableItems )
{
// Everything selected
selectAllCheck.prop( 'checked', true );
selectAllCheck.prop( 'indeterminate', false );
@@ -233,7 +233,7 @@
* pressed.
*/
filterTextBoxKeypress: function ( e ) {
- if ( e.which == 13 ) {
+ if ( e.which === 13 ) {
bm.applyFilter();
return false;
}
diff --git a/resources/infrastructure/centralnotice.js
b/resources/infrastructure/centralnotice.js
index c2a4975..434b095 100644
--- a/resources/infrastructure/centralnotice.js
+++ b/resources/infrastructure/centralnotice.js
@@ -105,7 +105,7 @@
var numBuckets = parseInt( this[ this.selectedIndex
].value, 10 ),
buckets = $( 'select[id^="bucketSelector"]' );
- if ( numBuckets == 1 ) {
+ if ( numBuckets === 1 ) {
buckets.prop( 'disabled', true );
} else {
buckets.prop( 'disabled', false );
--
To view, visit https://gerrit.wikimedia.org/r/344674
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I57907da2b12fcd36c76d20ce2294ff462d5f49e8
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/CentralNotice
Gerrit-Branch: master
Gerrit-Owner: Jforrester <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits