mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/Echo
synced 2024-09-23 10:22:05 +00:00
eslint: Fix warnings
* Load wikimedia/jsduck rules * Add inline disables for compat * Fix shadowed variables Change-Id: I42234ab74f5007c16ff3960309335e715da76c1c
This commit is contained in:
parent
025cd0f3ac
commit
bb1bd02bd6
|
@ -3,15 +3,13 @@
|
|||
"extends": [
|
||||
"wikimedia/client",
|
||||
"wikimedia/jquery",
|
||||
"wikimedia/mediawiki"
|
||||
"wikimedia/mediawiki",
|
||||
"wikimedia/jsduck"
|
||||
],
|
||||
"env": {
|
||||
"commonjs": true
|
||||
},
|
||||
"rules": {
|
||||
"max-len": "off",
|
||||
"mediawiki/class-doc": "warn",
|
||||
"no-shadow": "warn",
|
||||
"compat/compat": "warn"
|
||||
"max-len": "off"
|
||||
}
|
||||
}
|
||||
|
|
|
@ -65,7 +65,7 @@ module.exports = function ( grunt ) {
|
|||
} ]
|
||||
}
|
||||
},
|
||||
// eslint-disable-next-line es/no-object-assign
|
||||
// eslint-disable-next-line es/no-object-assign, compat/compat
|
||||
banana: Object.assign( {
|
||||
options: { requireLowerCase: false }
|
||||
}, conf.MessagesDirs ),
|
||||
|
|
|
@ -280,6 +280,7 @@ function initDesktop() {
|
|||
alertController.refreshUnreadCount();
|
||||
messageController.refreshUnreadCount();
|
||||
// Make notification update after n*pollingRate(time in secs) where n depends on document.hidden
|
||||
// eslint-disable-next-line compat/compat
|
||||
setTimeout( pollForNotificationCountUpdates, ( document.hidden ? 5 : 1 ) * pollingRate * 1000 );
|
||||
}
|
||||
|
||||
|
|
|
@ -124,8 +124,8 @@
|
|||
|
||||
// Listen to the event
|
||||
model
|
||||
.on( 'discard', function ( group ) {
|
||||
results.push( group.getName() );
|
||||
.on( 'discard', function ( g ) {
|
||||
results.push( g.getName() );
|
||||
} );
|
||||
|
||||
// Fill the list
|
||||
|
|
|
@ -159,8 +159,8 @@
|
|||
|
||||
// Listen to events
|
||||
model
|
||||
.on( 'update', function ( items ) {
|
||||
result.push( 'update:' + items.length );
|
||||
.on( 'update', function ( itms ) {
|
||||
result.push( 'update:' + itms.length );
|
||||
} )
|
||||
.on( 'discard', function ( item ) {
|
||||
result.push( 'discard:' + item.getId() );
|
||||
|
|
Loading…
Reference in a new issue