Update package.json and fix eslint issues (#322)
This commit is contained in:
committed by
Santhosh Thottingal
parent
9ab4deeb4e
commit
27c21219b4
27
package.json
27
package.json
@@ -11,8 +11,8 @@
|
||||
"l10n"
|
||||
],
|
||||
"author": {
|
||||
"name": "Santhosh Thottingal",
|
||||
"email": "santhosh.thottingal@gmail.com"
|
||||
"name": "Santhosh Thottingal",
|
||||
"email": "santhosh.thottingal@gmail.com"
|
||||
},
|
||||
"contributors": [
|
||||
"Alolita Sharma",
|
||||
@@ -25,26 +25,27 @@
|
||||
"Siebrand Mazeland"
|
||||
],
|
||||
"devDependencies": {
|
||||
"eslint-config-wikimedia": "0.5.0",
|
||||
"grunt": "^1.0.1",
|
||||
"grunt-eslint": "20.1.0",
|
||||
"grunt-stylelint": "0.9.0",
|
||||
"stylelint": "8.2.0",
|
||||
"grunt-contrib-qunit": "^1.2.0",
|
||||
"stylelint-config-wikimedia": "0.4.2"
|
||||
"eslint-config-wikimedia": "^0.7.2",
|
||||
"eslint-plugin-qunit": "^3.3.0",
|
||||
"grunt": "^1.0.3",
|
||||
"grunt-contrib-qunit": "^3.0.1",
|
||||
"grunt-eslint": "21.0.0",
|
||||
"grunt-stylelint": "0.10.0",
|
||||
"stylelint": "9.2.0",
|
||||
"stylelint-config-wikimedia": "0.4.3"
|
||||
},
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git://github.com/wikimedia/jquery.uls.git"
|
||||
},
|
||||
"bugs": {
|
||||
"url" : "https://github.com/wikimedia/jquery.uls/issues"
|
||||
"url": "https://github.com/wikimedia/jquery.uls/issues"
|
||||
},
|
||||
"engine": {
|
||||
"node": ">=6.11.1"
|
||||
},
|
||||
"license": "(MIT OR GPL-2.0+)",
|
||||
"scripts": {
|
||||
"test": "grunt test --verbose"
|
||||
"license": "(MIT OR GPL-2.0+)",
|
||||
"scripts": {
|
||||
"test": "grunt test --verbose"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -302,7 +302,8 @@
|
||||
* @param {Event} e
|
||||
*/
|
||||
cancel: function ( e ) {
|
||||
if ( e && ( this.$element.is( e.target ) || $.contains( this.$element[ 0 ], e.target ) ) ) {
|
||||
if ( e && ( this.$element.is( e.target ) ||
|
||||
$.contains( this.$element[ 0 ], e.target ) ) ) {
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -427,7 +428,7 @@
|
||||
* since the last time it was invoked.
|
||||
*
|
||||
* @param {Function} fn Function to be debounced.
|
||||
* @param {Number} wait Wait interval in milliseconds.
|
||||
* @param {number} wait Wait interval in milliseconds.
|
||||
* @param {boolean} [immediate] Trigger the function on the leading edge of the wait interval,
|
||||
* instead of the trailing edge.
|
||||
* @return {Function} Debounced function.
|
||||
|
||||
@@ -27,7 +27,8 @@
|
||||
*/
|
||||
$.uls.data.isRedirect = function ( language ) {
|
||||
return ( $.uls.data.languages[ language ] !== undefined &&
|
||||
$.uls.data.languages[ language ].length === 1 ) ? $.uls.data.languages[ language ][ 0 ] : false;
|
||||
$.uls.data.languages[ language ].length === 1 ) ?
|
||||
$.uls.data.languages[ language ][ 0 ] : false;
|
||||
};
|
||||
|
||||
/**
|
||||
@@ -77,7 +78,8 @@
|
||||
return $.uls.data.getAutonym( target );
|
||||
}
|
||||
|
||||
return ( $.uls.data.languages[ language ] && $.uls.data.languages[ language ][ 2 ] ) || language;
|
||||
return ( $.uls.data.languages[ language ] &&
|
||||
$.uls.data.languages[ language ][ 2 ] ) || language;
|
||||
};
|
||||
|
||||
/**
|
||||
@@ -137,7 +139,7 @@
|
||||
* Returns an associative array of languages in a region,
|
||||
* grouped by script group.
|
||||
* @param {string} region Region code
|
||||
* @return {object}
|
||||
* @return {Object}
|
||||
*/
|
||||
$.uls.data.getLanguagesByScriptGroupInRegion = function ( region ) {
|
||||
return $.uls.data.getLanguagesByScriptGroupInRegions( [ region ] );
|
||||
|
||||
@@ -268,7 +268,8 @@
|
||||
}
|
||||
|
||||
userInput = this.$element.val();
|
||||
suggestion = userInput + languageName.substring( userInput.length, languageName.length );
|
||||
suggestion = userInput +
|
||||
languageName.substring( userInput.length, languageName.length );
|
||||
|
||||
if ( suggestion.toLowerCase() !== languageName.toLowerCase() ) {
|
||||
// see if it was autonym match
|
||||
|
||||
@@ -41,7 +41,8 @@
|
||||
* @cfg {number} [columns] Number of columns for languages. Default is 4.
|
||||
* @cfg {Function} [languageDecorator] Callback function to be called when a language
|
||||
* link is prepared - for custom decoration.
|
||||
* @cfg {Function|string[]} [quickList] The languages to display as suggestions for quick selection.
|
||||
* @cfg {Function|string[]} [quickList] The languages to display as suggestions for quick
|
||||
* selection.
|
||||
* @cfg {Function} [clickhandler] Callback when language is selected.
|
||||
* @cfg {jQuery|Function} [noResultsTemplate]
|
||||
*/
|
||||
@@ -127,7 +128,8 @@
|
||||
* Override the default region grouping setting.
|
||||
* This is to allow LanguageFilter to disable grouping when displaying search results.
|
||||
*
|
||||
* @param {boolean|null} val True to force grouping, false to disable, null to undo override.
|
||||
* @param {boolean|null} val True to force grouping, false to disable, null
|
||||
* to undo override.
|
||||
*/
|
||||
setGroupByRegionOverride: function ( val ) {
|
||||
this.groupByRegionOverride = val;
|
||||
@@ -218,7 +220,7 @@
|
||||
/**
|
||||
* Adds given languages sorted into rows and columns into given element.
|
||||
* @param {jQuery} $region Element to add language list.
|
||||
* @param {array} languages List of language codes.
|
||||
* @param {Array} languages List of language codes.
|
||||
* @param {number} itemsPerColumn How many languages fit in a column.
|
||||
* @param {number} columnsPerRow How many columns fit in a row.
|
||||
*/
|
||||
@@ -257,8 +259,8 @@
|
||||
nextScript = $.uls.data.getScriptGroupOfLanguage( languages[ i + 1 ] );
|
||||
|
||||
lastItem = languagesCount - i === 1;
|
||||
// Force column break if script changes and column has more than one row already,
|
||||
// but only if grouping by region
|
||||
// Force column break if script changes and column has more than one
|
||||
// row already, but only if grouping by region
|
||||
if ( i === 0 || !this.isGroupingByRegionEnabled() ) {
|
||||
currentScript = $.uls.data.getScriptGroupOfLanguage( languages[ i ] );
|
||||
} else if ( currentScript !== nextScript && items.length > 1 ) {
|
||||
|
||||
Reference in New Issue
Block a user