mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/RevisionSlider
synced 2024-11-29 01:30:35 +00:00
eslint: Remove old jshint/jscs refs, fix exceptions
Change-Id: I56b9f037405d0f93f82dc81dad1cc1b111be338e
This commit is contained in:
parent
c3643df69e
commit
1c3ef546ad
|
@ -9,5 +9,8 @@
|
|||
"globals": {
|
||||
"mediaWiki": false,
|
||||
"OO": false
|
||||
},
|
||||
"rules": {
|
||||
"dot-notation": [ "error", { "allowKeywords": true } ]
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1 +0,0 @@
|
|||
node_modules
|
25
.jshintrc
25
.jshintrc
|
@ -1,25 +0,0 @@
|
|||
{
|
||||
// Enforcing
|
||||
"bitwise": true,
|
||||
"devel": true,
|
||||
"eqeqeq": true,
|
||||
"es3": true,
|
||||
"latedef": true,
|
||||
"noarg": true,
|
||||
"nonew": true,
|
||||
"undef": true,
|
||||
"unused": true,
|
||||
"strict": false,
|
||||
|
||||
// Environment
|
||||
"browser": true,
|
||||
|
||||
"globals": {
|
||||
"mw": false,
|
||||
"$": false,
|
||||
"mediaWiki": false,
|
||||
"jQuery": false,
|
||||
"QUnit": false,
|
||||
"OO": false
|
||||
}
|
||||
}
|
|
@ -1,4 +1,4 @@
|
|||
/* jshint node:true */
|
||||
/* eslint-env node */
|
||||
module.exports = function ( grunt ) {
|
||||
grunt.loadNpmTasks( 'grunt-banana-checker' );
|
||||
grunt.loadNpmTasks( 'grunt-eslint' );
|
||||
|
|
|
@ -32,11 +32,7 @@
|
|||
xhr = this.fetchRevisions( pageName, options )
|
||||
.done( function ( data ) {
|
||||
var revs = data.query.pages[ 0 ].revisions,
|
||||
/* eslint-disable dot-notation */
|
||||
/* jshint -W024 */
|
||||
revContinue = data.continue,
|
||||
/* jshint +W024 */
|
||||
/* eslint-enable dot-notation */
|
||||
genderData = options.knownUserGenders || {},
|
||||
userNames;
|
||||
|
||||
|
|
|
@ -1,8 +1,4 @@
|
|||
( function ( mw, $ ) {
|
||||
/* eslint-disable dot-notation */
|
||||
// JSHint does not like OOJS' usage of "static" and "super"
|
||||
/* jshint -W024 */
|
||||
|
||||
/**
|
||||
* Module containing the RevisionSlider tutorial
|
||||
*
|
||||
|
|
|
@ -649,11 +649,9 @@
|
|||
|
||||
self.addRevisionsAtEnd( $slider, revs );
|
||||
|
||||
/* jshint -W024 */
|
||||
if ( data.continue === undefined ) { // eslint-disable-line dot-notation
|
||||
if ( data.continue === undefined ) {
|
||||
self.noMoreNewerRevisions = true;
|
||||
}
|
||||
/* jshint +W024 */
|
||||
} );
|
||||
},
|
||||
|
||||
|
@ -690,11 +688,9 @@
|
|||
}
|
||||
self.addRevisionsAtStart( $slider, revs, precedingRevisionSize );
|
||||
|
||||
/* jshint -W024 */
|
||||
if ( data.continue === undefined ) { // eslint-disable-line dot-notation
|
||||
if ( data.continue === undefined ) {
|
||||
self.noMoreOlderRevisions = true;
|
||||
}
|
||||
/* jshint +W024 */
|
||||
} );
|
||||
},
|
||||
|
||||
|
|
|
@ -4,11 +4,7 @@
|
|||
expanded = autoExpand,
|
||||
initialized = false,
|
||||
autoExpandButton,
|
||||
/* eslint-disable dot-notation */
|
||||
/* jshint -W024 */
|
||||
toggleButton = OO.ui.ButtonWidget.static.infuse( $( '.mw-revslider-toggle-button' ) ),
|
||||
/* jshint +W024 */
|
||||
/* eslint-enable dot-notation */
|
||||
initialize = function () {
|
||||
var startTime = mw.now(),
|
||||
api = new mw.libs.revisionSlider.Api( mw.util.wikiScript( 'api' ) );
|
||||
|
|
|
@ -51,7 +51,7 @@
|
|||
mw.config.values.extRevisionSliderOldRev = null;
|
||||
mw.config.values.extRevisionSliderNewRev = null;
|
||||
|
||||
assert.throws( // eslint-disable-line dot-notation
|
||||
assert.throws(
|
||||
function () {
|
||||
view.render( $container );
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue