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