eslint: Remove old jshint/jscs refs, fix exceptions

Change-Id: I56b9f037405d0f93f82dc81dad1cc1b111be338e
This commit is contained in:
Ed Sanders 2016-11-19 13:37:20 +00:00
parent c3643df69e
commit 1c3ef546ad
10 changed files with 7 additions and 49 deletions

View file

@ -9,5 +9,8 @@
"globals": {
"mediaWiki": false,
"OO": false
},
"rules": {
"dot-notation": [ "error", { "allowKeywords": true } ]
}
}

View file

@ -1,3 +0,0 @@
{
"preset": "wikimedia"
}

View file

@ -1 +0,0 @@
node_modules

View file

@ -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
}
}

View file

@ -1,4 +1,4 @@
/* jshint node:true */
/* eslint-env node */
module.exports = function ( grunt ) {
grunt.loadNpmTasks( 'grunt-banana-checker' );
grunt.loadNpmTasks( 'grunt-eslint' );

View file

@ -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;

View file

@ -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
*

View file

@ -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 */
} );
},

View file

@ -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' ) );

View file

@ -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 );
}