Fix all jshint errors
Change-Id: Ib8fb350132bb34c1e063eb644af5aeff833f95e8
This commit is contained in:
11
.jshintrc
11
.jshintrc
@@ -35,6 +35,15 @@
|
||||
"predef": [
|
||||
"mediaWiki",
|
||||
"jQuery",
|
||||
"QUnit"
|
||||
|
||||
/* Qunit specific rules */
|
||||
"QUnit",
|
||||
"module",
|
||||
"expect",
|
||||
"start",
|
||||
"stop",
|
||||
"ok",
|
||||
"test",
|
||||
"strictEqual"
|
||||
]
|
||||
}
|
||||
|
||||
@@ -66,6 +66,7 @@
|
||||
return ( window.navigator.language || window.navigator.userLanguage ).split( '-' )[0];
|
||||
};
|
||||
|
||||
/*jshint camelcase:false*/
|
||||
mw.uls.getCountryCode = function () {
|
||||
return window.Geo && ( window.Geo.country || window.Geo.country_code );
|
||||
};
|
||||
|
||||
@@ -477,9 +477,8 @@
|
||||
if ( success ) {
|
||||
// Live ime update
|
||||
this.$parent.hide();
|
||||
} else {
|
||||
// FIXME failure. what to do?!
|
||||
}
|
||||
// FIXME in case of failure. what to do?!
|
||||
},
|
||||
|
||||
/**
|
||||
|
||||
@@ -167,8 +167,9 @@
|
||||
* @param callback
|
||||
*/
|
||||
save: function ( callback ) {
|
||||
var ulsPreferences = this;
|
||||
|
||||
var ulsPreferences = this,
|
||||
successFunction,
|
||||
failFunction;
|
||||
|
||||
callback = callback || $.noop;
|
||||
if ( this.isAnon ) {
|
||||
@@ -176,7 +177,6 @@
|
||||
$.jStorage.set( this.preferenceName, this.preferences );
|
||||
callback.call( this, true );
|
||||
} else {
|
||||
var successFunction, failFunction;
|
||||
|
||||
successFunction = function () {
|
||||
callback.call( this, true );
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
* @licence MIT License
|
||||
*/
|
||||
|
||||
( function ( $ ) {
|
||||
( function ( $, mw ) {
|
||||
'use strict';
|
||||
|
||||
module( 'ext.uls', QUnit.newMwEnvironment() );
|
||||
@@ -68,4 +68,4 @@
|
||||
prefs.set( prefName, undefined );
|
||||
prefs.save();
|
||||
} );
|
||||
}( jQuery ) );
|
||||
}( jQuery, mediaWiki ) );
|
||||
|
||||
Reference in New Issue
Block a user