Krinkle has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/117198

Change subject: jsduck: Clean up odd use of @returns instead of @return
......................................................................

jsduck: Clean up odd use of @returns instead of @return

The fast majority in core uses @return, a handful were using
@returns though (which works because JSDuck supports it as alias
for @return).

Also cleaned up minor things in touched areas:
* Hoist second description for jQuery.matchSrcSet (there can only
  be one, it was currently interpreted as continuation of the
  @return caption).
* Remove redundant @method.

Change-Id: I15d1d023f0424e38c58a252139e6bb2f0b36d2b4
---
M resources/jquery/jquery.client.js
M resources/jquery/jquery.hidpi.js
M resources/jquery/jquery.localize.js
M resources/mediawiki/mediawiki.js
4 files changed, 8 insertions(+), 10 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/98/117198/1

diff --git a/resources/jquery/jquery.client.js 
b/resources/jquery/jquery.client.js
index 4c6a7ac..6689b7c 100644
--- a/resources/jquery/jquery.client.js
+++ b/resources/jquery/jquery.client.js
@@ -20,7 +20,7 @@
                 *
                 * @param {Object} nav An object with atleast a 'userAgent' and 
'platform' key.
                 * Defaults to the global Navigator object.
-                * @returns {Object} The resulting client object will be in the 
following format:
+                * @return {Object} The resulting client object will be in the 
following format:
                 *  {
                 *   'name': 'firefox',
                 *   'layout': 'gecko',
@@ -231,7 +231,7 @@
                 * @param {boolean} [exactMatchOnly=false] Only return true if 
the browser is matched, otherwise
                 * returns true if the browser is not found.
                 *
-                * @returns {boolean} The current browser is in the support map
+                * @return {boolean} The current browser is in the support map
                 */
                test: function ( map, profile, exactMatchOnly ) {
                        /*jshint evil: true */
diff --git a/resources/jquery/jquery.hidpi.js b/resources/jquery/jquery.hidpi.js
index 70bfc4e..eb29db9 100644
--- a/resources/jquery/jquery.hidpi.js
+++ b/resources/jquery/jquery.hidpi.js
@@ -16,8 +16,7 @@
  *
  * Uses window.devicePixelRatio if available, or CSS media queries on IE.
  *
- * @method
- * @returns {number} Device pixel ratio
+ * @return {number} Device pixel ratio
  */
 $.devicePixelRatio = function () {
        if ( window.devicePixelRatio !== undefined ) {
@@ -51,8 +50,7 @@
  * Implement responsive images based on srcset attributes, if browser has no
  * native srcset support.
  *
- * @method
- * @returns {jQuery} This selection
+ * @return {jQuery} This selection
  */
 $.fn.hidpi = function () {
        var $target = this,
@@ -81,11 +79,11 @@
 /**
  * Match a srcset entry for the given device pixel ratio
  *
+ * Exposed for testing.
+ *
  * @param {number} devicePixelRatio
  * @param {string} srcset
  * @return {mixed} null or the matching src string
- *
- * Exposed for testing.
  */
 $.matchSrcSet = function ( devicePixelRatio, srcset ) {
        var candidates,
diff --git a/resources/jquery/jquery.localize.js 
b/resources/jquery/jquery.localize.js
index d9a2b19..e0d9de2 100644
--- a/resources/jquery/jquery.localize.js
+++ b/resources/jquery/jquery.localize.js
@@ -9,7 +9,7 @@
  *
  * @param {Object} options
  * @param {string} key
- * @returns {string} Localized message
+ * @return {string} Localized message
  */
 function msg( options, key ) {
        var args = options.params[key] || [];
diff --git a/resources/mediawiki/mediawiki.js b/resources/mediawiki/mediawiki.js
index a7c946d..597f396 100644
--- a/resources/mediawiki/mediawiki.js
+++ b/resources/mediawiki/mediawiki.js
@@ -381,7 +381,7 @@
                 * values with microsecond precision that are guaranteed to be 
monotonic. On all other browsers,
                 * it will fall back to using `Date`.
                 *
-                * @returns {number} Current time
+                * @return {number} Current time
                 */
                now: ( function () {
                        var perf = window.performance,

-- 
To view, visit https://gerrit.wikimedia.org/r/117198
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I15d1d023f0424e38c58a252139e6bb2f0b36d2b4
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Krinkle <krinklem...@gmail.com>

_______________________________________________
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to