jenkins-bot has submitted this change and it was merged.

Change subject: build: Enable jscs jsDoc rule 'requireReturnTypes' and make pass
......................................................................


build: Enable jscs jsDoc rule 'requireReturnTypes' and make pass

As in MediaWiki core since b159471dd1063e397f117305f8b65e075de58131

Bug: T110811
Change-Id: Ib9ee66fb4dc2e745ed364ae66ca21e2debfd0008
---
M .jscsrc
M lib/resources/wikibase.Site.js
M lib/resources/wikibase.sites.js
M view/resources/jquery/wikibase/jquery.wikibase.statementgrouplabelscroll.js
M view/resources/jquery/wikibase/snakview/snakview.SnakTypeSelector.js
M view/resources/wikibase/wikibase.getLanguageNameByCode.js
6 files changed, 16 insertions(+), 16 deletions(-)

Approvals:
  Hoo man: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/.jscsrc b/.jscsrc
index c82e371..d3f8d33 100644
--- a/.jscsrc
+++ b/.jscsrc
@@ -18,7 +18,7 @@
                "checkRedundantParams": true,
                //"checkReturnTypes": true,
                "checkRedundantReturns": true,
-               //"requireReturnTypes": true,
+               "requireReturnTypes": true,
                "checkTypes": "strictNativeCase",
                "checkRedundantAccess": true
                //"requireNewlineAfterDescription": true
diff --git a/lib/resources/wikibase.Site.js b/lib/resources/wikibase.Site.js
index 5afb3a7..31a0b10 100644
--- a/lib/resources/wikibase.Site.js
+++ b/lib/resources/wikibase.Site.js
@@ -31,7 +31,7 @@
        /**
         * Returns the full name of the site. This will return the name in the 
users language.
         *
-        * @return string
+        * @return {string}
         */
        getName: function() {
                return this._siteDetails.name;
@@ -40,7 +40,7 @@
        /**
         * Returns the short name of the site. This will return the name in the 
users language.
         *
-        * @return string
+        * @return {string}
         */
        getShortName: function() {
                return this._siteDetails.shortName;
@@ -51,7 +51,7 @@
         *
         * @since 0.4
         *
-        * @return string
+        * @return {string}
         */
        getGroup: function() {
                return this._siteDetails.group;
@@ -63,7 +63,7 @@
         * @note: this might not be necessary later since we might want to do 
only API call to the
         *        base wiki which will handle the calls to the sites.
         *
-        * @return string
+        * @return {string}
         */
        getApi: function() {
                return this._siteDetails.apiUrl;
@@ -78,7 +78,7 @@
         *       what parameters to pass in case we have a non-MW installation!)
         *
         * @param {string} pageTitle title of the page within the site
-        * @return string
+        * @return {string}
         */
        getUrlTo: function( pageTitle ) {
                pageTitle = this._urlEncodeSite( $.trim( pageTitle ) );
@@ -89,7 +89,7 @@
         * Returns a html link to a site of the site. To get the url only, use 
getUrlTo().
         *
         * @param {string} pageTitle title of the site within the site
-        * @return jQuery link to the site
+        * @return {jQuery} link to the site
         */
        getLinkTo: function( pageTitle ) {
                var url = this.getUrlTo( pageTitle );
@@ -102,7 +102,7 @@
        /**
         * Returns the site's language code.
         *
-        * @return string language code
+        * @return {string} language code
         */
        getLanguageCode: function() {
                return this._siteDetails.languageCode;
@@ -125,7 +125,7 @@
         * This should propably be over written in case the site is not a 
MediaWiki installation.
         *
         * @param {string} pageTitle
-        * @return string
+        * @return {string}
         */
        _urlEncodeSite: function( pageTitle ) {
                // we don't create a mw.Title here since the given title should 
be normalized and could be one from a foreign
diff --git a/lib/resources/wikibase.sites.js b/lib/resources/wikibase.sites.js
index d8fb519..a191eff 100644
--- a/lib/resources/wikibase.sites.js
+++ b/lib/resources/wikibase.sites.js
@@ -69,7 +69,7 @@
                /**
                 * Returns an array with all known site groups.
                 *
-                * @return string[]
+                * @return {string[]}
                 */
                this.getSiteGroups = function() {
                        var groups = [],
@@ -100,7 +100,7 @@
                 * related to the given ID, null will be returned.
                 *
                 * @param {string} siteId
-                * @return wikibase.Site|null
+                * @return {wikibase.Site|null}
                 */
                this.getSite = function( siteId ) {
                        var sites = this.getSites(),
@@ -120,7 +120,7 @@
                 *             the Site object.
                 *
                 * @param {string} globalSiteId
-                * @return wikibase.Site|null
+                * @return {wikibase.Site|null}
                 */
                this.getSiteByGlobalId = function( globalSiteId ) {
                        return this.getSite( globalSiteId );
diff --git 
a/view/resources/jquery/wikibase/jquery.wikibase.statementgrouplabelscroll.js 
b/view/resources/jquery/wikibase/jquery.wikibase.statementgrouplabelscroll.js
index 5b6162b..6a1aee4 100644
--- 
a/view/resources/jquery/wikibase/jquery.wikibase.statementgrouplabelscroll.js
+++ 
b/view/resources/jquery/wikibase/jquery.wikibase.statementgrouplabelscroll.js
@@ -282,7 +282,7 @@
         * Returns an array with the active instances of the widget. A widget 
instance is considered
         * active after its first initialization and inactive after its 
"destroy" function got called.
         *
-        * @return $.wikibase.statementgrouplabelscroll[]
+        * @return {$.wikibase.statementgrouplabelscroll[]}
         */
        $.wikibase[ WIDGET_NAME ].activeInstances = function() {
                return activeInstances.slice();
diff --git 
a/view/resources/jquery/wikibase/snakview/snakview.SnakTypeSelector.js 
b/view/resources/jquery/wikibase/snakview/snakview.SnakTypeSelector.js
index 52be90c..aebb9dc 100644
--- a/view/resources/jquery/wikibase/snakview/snakview.SnakTypeSelector.js
+++ b/view/resources/jquery/wikibase/snakview/snakview.SnakTypeSelector.js
@@ -152,7 +152,7 @@
                 * Returns a DOM structure for the selector's menu the `Snak` 
type can be chosen from.
                 * @private
                 *
-                * @return jQuery
+                * @return {jQuery}
                 */
                _buildMenu: function() {
                        var classPrefix = this.widgetBaseClass + '-menuitem-',
diff --git a/view/resources/wikibase/wikibase.getLanguageNameByCode.js 
b/view/resources/wikibase/wikibase.getLanguageNameByCode.js
index bb50840..cb7991b 100644
--- a/view/resources/wikibase/wikibase.getLanguageNameByCode.js
+++ b/view/resources/wikibase/wikibase.getLanguageNameByCode.js
@@ -27,7 +27,7 @@
         * Falls back to the language code.
         *
         * @param {string} langCode
-        * @return string
+        * @return {string}
         */
        var getNativeLanguageName = function( langCode ) {
                var languages = getLanguages();
@@ -40,7 +40,7 @@
         * Falls back to getNativeLanguageName, which may fall back to the 
language code.
         *
         * @param {string} langCode
-        * @return string
+        * @return {string}
         */
        wb.getLanguageNameByCode = function( langCode ) {
                var ulsLanguages = mw.config.get( 'wgULSLanguages' );

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ib9ee66fb4dc2e745ed364ae66ca21e2debfd0008
Gerrit-PatchSet: 3
Gerrit-Project: mediawiki/extensions/Wikibase
Gerrit-Branch: master
Gerrit-Owner: Ricordisamoa <ricordisa...@openmailbox.org>
Gerrit-Reviewer: Adrian Lang <adrian.he...@wikimedia.de>
Gerrit-Reviewer: Hoo man <h...@online.de>
Gerrit-Reviewer: Jeroen De Dauw <jeroended...@gmail.com>
Gerrit-Reviewer: jenkins-bot <>

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

Reply via email to