Update eslint and other devDependencies (#391)

* Update eslint and other devDependencies

* Lint JS in examples/ using eslint-plugin-html (#392)
This commit is contained in:
Ed S
2021-05-14 10:48:37 +01:00
committed by GitHub
parent ab929b81d8
commit 7a6e559fe5
17 changed files with 10287 additions and 12114 deletions

View File

@@ -13,9 +13,8 @@
* header is left intact. See files GPL-LICENSE and MIT-LICENSE for details.
*
* @file
* @ingroup Extensions
* @licence GNU General Public Licence 2.0 or later
* @licence MIT License
* @license GNU General Public Licence 2.0 or later
* @license MIT License
*/
( function ( $ ) {
@@ -47,6 +46,7 @@
/**
* ULS Public class definition
*
* @param {Element} element
* @param {Object} options
*/
@@ -112,6 +112,7 @@
/**
* Calculate the position of ULS
* Returns an object with top and left properties.
*
* @return {Object}
*/
position: function () {
@@ -292,6 +293,7 @@
/**
* On select handler for search results
*
* @param {string} langCode
* @param {Object} event The jQuery click event
*/
@@ -304,6 +306,7 @@
/**
* On cancel handler for the uls menu
*
* @param {Event} e
*/
cancel: function ( e ) {
@@ -337,6 +340,7 @@
/**
* Get the panel menu width parameter
*
* @return {string}
*/
getMenuWidth: function () {

View File

@@ -12,9 +12,8 @@
* header is left intact. See files GPL-LICENSE and MIT-LICENSE for details.
*
* @file
* @ingroup Extensions
* @licence GNU General Public Licence 2.0 or later
* @licence MIT License
* @license GNU General Public Licence 2.0 or later
* @license MIT License
*/
( function ( $ ) {
@@ -22,6 +21,7 @@
/**
* Is this language a redirect to another language?
*
* @param {string} language Language code
* @return {string|boolean} Target language code if it's a redirect or false if it's not
*/
@@ -33,6 +33,7 @@
/**
* Returns the script of the language.
*
* @param {string} language Language code
* @return {string}
*/
@@ -53,6 +54,7 @@
/**
* Returns the regions in which a language is spoken.
*
* @param {string} language Language code
* @return {string|string[]}
*/
@@ -68,6 +70,7 @@
/**
* Returns the autonym of the language.
*
* @param {string} language Language code
* @return {string}
*/
@@ -84,6 +87,7 @@
/**
* Returns all language codes and corresponding autonyms
*
* @return {string[]}
*/
$.uls.data.getAutonyms = function () {
@@ -103,6 +107,7 @@
/**
* Returns all languages written in script.
*
* @param {string} script string
* @return {string[]} languages codes
*/
@@ -112,6 +117,7 @@
/**
* Returns all languages written in the given scripts.
*
* @param {string[]} scripts
* @return {string[]} languages codes
*/
@@ -138,6 +144,7 @@
/**
* Returns an associative array of languages in a region,
* grouped by script group.
*
* @param {string} region Region code
* @return {Object}
*/
@@ -147,6 +154,7 @@
/**
* Get the given list of languages grouped by script.
*
* @param {string[]} languages Array of language codes to group
* @return {string[]} Array of language codes
*/
@@ -169,6 +177,7 @@
/**
* Returns an associative array of languages in several regions,
* grouped by script group.
*
* @param {string[]} regions region codes
* @return {Object}
*/
@@ -201,6 +210,7 @@
/**
* Returns the script group of a script or 'Other' if it doesn't
* belong to any group.
*
* @param {string} script Script code
* @return {string} script group name
*/
@@ -218,6 +228,7 @@
/**
* Returns the script group of a language.
*
* @param {string} language Language code
* @return {string} script group name
*/
@@ -227,6 +238,7 @@
/**
* Return the list of languages sorted by script groups.
*
* @param {string[]} languages Array of language codes to sort
* @return {string[]} Array of language codes
*/
@@ -247,6 +259,7 @@
/**
* A callback for sorting languages by autonym.
* Can be used as an argument to a sort function.
*
* @param {string} a Language code
* @param {string} b Language code
* @return {number}
@@ -260,6 +273,7 @@
/**
* Check if a language is right-to-left.
*
* @param {string} language Language code
* @return {boolean}
*/
@@ -269,6 +283,7 @@
/**
* Return the direction of the language
*
* @param {string} language Language code
* @return {string}
*/
@@ -278,6 +293,7 @@
/**
* Returns the languages spoken in a territory.
*
* @param {string} territory Territory code
* @return {string[]} list of language codes
*/

View File

@@ -12,9 +12,8 @@
* header is left intact. See files GPL-LICENSE and MIT-LICENSE for details.
*
* @file
* @ingroup Extensions
* @licence GNU General Public Licence 2.0 or later
* @licence MIT License
* @license GNU General Public Licence 2.0 or later
* @license MIT License
*/
/**
@@ -224,6 +223,7 @@
/**
* Handler method to be called once search is over.
* Based on search result triggers resultsfound or noresults events
*
* @param {string} query
* @param {string[]} results
* @param {string} [autofillLabel]
@@ -306,6 +306,7 @@
* b) Language autonym 'starts with' search string.
* c) ISO 639 code match with search string.
* d) ISO 15924 code for the script match the search string.
*
* @param {string} langCode
* @param {string} searchTerm
* @return {boolean}

View File

@@ -14,9 +14,8 @@
* header is left intact. See files GPL-LICENSE and MIT-LICENSE for details.
*
* @file
* @ingroup Extensions
* @licence GNU General Public Licence 2.0 or later
* @licence MIT License
* @license GNU General Public Licence 2.0 or later
* @license MIT License
*/
( function ( $ ) {
@@ -32,6 +31,7 @@
/**
* Language category display
*
* @param {Element} element The container element to which the languages to be displayed
* @param {Object} [options] Configuration object
* @cfg {Object} [languages] Selectable languages. Keyed by language code, values are autonyms.
@@ -69,6 +69,7 @@
/**
* Adds language to the language list.
*
* @param {string} langCode
* @param {string} [regionCode]
* @return {boolean} Whether the language was known and accepted
@@ -112,6 +113,7 @@
/**
* Whether we should render languages grouped to geographic regions.
*
* @return {boolean}
*/
isGroupingByRegionEnabled: function () {
@@ -219,6 +221,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 {number} itemsPerColumn How many languages fit in a column.
@@ -286,6 +289,7 @@
/**
* Creates dom node representing one item in language list.
*
* @param {string} code Language code
* @return {Element}
*/
@@ -387,6 +391,7 @@
/**
* No-results event handler
*
* @param {Event} event
* @param {Object} data Information about the failed search query
*/