mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/RevisionSlider
synced 2024-11-14 19:24:42 +00:00
build: Bump eslint-config-wikimedia to v0.3.0 and make pass
Change-Id: I774e05c4393eca8b4719f335a124efcb3d2a6dd5
This commit is contained in:
parent
518aea3ead
commit
3269f791f5
|
@ -52,7 +52,7 @@
|
|||
$sidePanel = $( '#mw-panel' ),
|
||||
$navigation = $( '#p-views' ),
|
||||
$catLinks = $( '#catlinks' ),
|
||||
$printFooter = $( '.printfooter' ),
|
||||
$printFooter = $( '.printfooter' ),
|
||||
scrollLeft = $container.find( '.mw-revslider-revisions-container' ).scrollLeft();
|
||||
|
||||
// Add our current rendered slider into the newly loaded container
|
||||
|
@ -76,9 +76,11 @@
|
|||
// Following wikEdDiff.js-specific code is deprecated and will be removed in the future.
|
||||
// WikEdDiff should be updated to use a hook.
|
||||
if ( self.wikEdDiffDetected() ) {
|
||||
/* eslint-disable no-console */
|
||||
console.log( 'You are running WikEdDiff & your copy of the code may need to be updated to work with the RevisionSlider.' );
|
||||
console.log( 'Please see: https://phabricator.wikimedia.org/T143199#2631963' );
|
||||
console.log( 'If WikEdDiff is still working while using the RevisonSlider then the code change has already been done.' );
|
||||
/* eslint-enable no-console */
|
||||
}
|
||||
|
||||
}, function ( xhr ) {
|
||||
|
@ -87,6 +89,8 @@
|
|||
this.tryCount++;
|
||||
mw.track( 'counter.MediaWiki.RevisionSlider.error.refresh' );
|
||||
if ( retryAttempt <= retryLimit ) {
|
||||
// TODO Remove this debugging code?
|
||||
// eslint-disable-next-line no-console
|
||||
console.log( 'Retrying request' );
|
||||
self.refresh( revId1, revId2, retryAttempt + 1 );
|
||||
}
|
||||
|
|
|
@ -110,7 +110,7 @@
|
|||
if ( this.pointer.getView().isUpperPointer() ) {
|
||||
$lowerLineDiv.removeClass( 'mw-revslider-lower-color' ).addClass( 'mw-revslider-upper-color' );
|
||||
$upperLineDiv.removeClass( 'mw-revslider-lower-color' ).addClass( 'mw-revslider-upper-color' );
|
||||
$targetColumn = $( '.diff-ntitle' );
|
||||
$targetColumn = $( '.diff-ntitle' );
|
||||
} else {
|
||||
$lowerLineDiv.removeClass( 'mw-revslider-upper-color' ).addClass( 'mw-revslider-lower-color' );
|
||||
$upperLineDiv.removeClass( 'mw-revslider-upper-color' ).addClass( 'mw-revslider-lower-color' );
|
||||
|
@ -121,7 +121,7 @@
|
|||
|
||||
$upperLineDiv.addClass( 'mw-revslider-bottom-line' );
|
||||
|
||||
if ( this.targetColumnIsRightFromPointer( $sourcePointer, $targetColumn ) ) {
|
||||
if ( this.targetColumnIsRightFromPointer( $sourcePointer, $targetColumn ) ) {
|
||||
$upperLineDiv.addClass( 'mw-revslider-left-line' );
|
||||
$lowerLineDiv.addClass( 'mw-revslider-right-line' );
|
||||
} else {
|
||||
|
|
|
@ -115,7 +115,7 @@
|
|||
if ( posBeforeSlider ) {
|
||||
return this.animateTo( this.getOffset() - 2 * slider.getView().revisionWidth, duration );
|
||||
} else {
|
||||
return this.animateTo( slider.getRevisionsPerWindow() * slider.getView().revisionWidth + this.getOffset(), duration );
|
||||
return this.animateTo( slider.getRevisionsPerWindow() * slider.getView().revisionWidth + this.getOffset(), duration );
|
||||
}
|
||||
},
|
||||
|
||||
|
|
|
@ -53,6 +53,8 @@
|
|||
} catch ( err ) {
|
||||
$( '.mw-revslider-placeholder' )
|
||||
.text( mw.message( 'revisionslider-loading-failed' ).text() );
|
||||
// TODO: Replace with mw.log.error?
|
||||
// eslint-disable-next-line no-console
|
||||
console.log( err );
|
||||
mw.track( 'counter.MediaWiki.RevisionSlider.error.init' );
|
||||
}
|
||||
|
@ -61,6 +63,8 @@
|
|||
}, function ( err ) {
|
||||
$( '.mw-revslider-placeholder' )
|
||||
.text( mw.message( 'revisionslider-loading-failed' ).text() );
|
||||
// TODO: Replace with mw.log.error?
|
||||
// eslint-disable-next-line no-console
|
||||
console.log( err );
|
||||
mw.track( 'counter.MediaWiki.RevisionSlider.error.init' );
|
||||
} );
|
||||
|
|
|
@ -11,7 +11,7 @@
|
|||
"test": "grunt test"
|
||||
},
|
||||
"devDependencies": {
|
||||
"eslint-config-wikimedia": "0.1.0",
|
||||
"eslint-config-wikimedia": "0.3.0",
|
||||
"grunt": "1.0.1",
|
||||
"grunt-banana-checker": "0.5.0",
|
||||
"grunt-eslint": "19.0.0",
|
||||
|
|
|
@ -108,4 +108,3 @@
|
|||
} );
|
||||
|
||||
}( mediaWiki ) );
|
||||
|
||||
|
|
Loading…
Reference in a new issue