Ricordisamoa has uploaded a new change for review. https://gerrit.wikimedia.org/r/243083
Change subject: build: Enable jscs jsDoc rule 'checkTypes' and make pass ...................................................................... build: Enable jscs jsDoc rule 'checkTypes' and make pass Set to 'strictNativeCase', as in the wikimedia preset since https://github.com/jscs-dev/node-jscs/pull/1618 and MediaWiki core since commit e8608b94a51eeccdf692e7fd1907f28fdf814f18 Only 4 occurrences of 'String' and 9 of 'object' were found. Most of the code already followed the convention. Change-Id: I778389de4122a4ecfc129858e4fcecf04055eae8 --- M .jscsrc M client/resources/jquery.wikibase/jquery.wikibase.linkitem.js M client/resources/wikibase.client.PageConnector.js M view/tests/qunit/wikibase/templates.tests.js 4 files changed, 14 insertions(+), 14 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Wikibase refs/changes/83/243083/1 diff --git a/.jscsrc b/.jscsrc index bae0d05..c82e371 100644 --- a/.jscsrc +++ b/.jscsrc @@ -19,7 +19,7 @@ //"checkReturnTypes": true, "checkRedundantReturns": true, //"requireReturnTypes": true, - //"checkTypes": "capitalizedNativeCase", + "checkTypes": "strictNativeCase", "checkRedundantAccess": true //"requireNewlineAfterDescription": true }, diff --git a/client/resources/jquery.wikibase/jquery.wikibase.linkitem.js b/client/resources/jquery.wikibase/jquery.wikibase.linkitem.js index 879c629..4bf2ce0 100644 --- a/client/resources/jquery.wikibase/jquery.wikibase.linkitem.js +++ b/client/resources/jquery.wikibase/jquery.wikibase.linkitem.js @@ -247,7 +247,7 @@ * Gets an object with all linkable sites despite the current one (as pages on the same wiki * cannot be linked). * - * @return {object} + * @return {Object} */ _getLinkableSites: function() { var sites, @@ -397,7 +397,7 @@ * Handles the data from getNewlyLinkedPages and either creates a new item or shows the user a * confirmation form in case an item exists already. * - * @param {object} entity + * @param {Object} entity */ _onConfirmationDataLoad: function( entity ) { var i, itemLink; @@ -446,7 +446,7 @@ /** * Let the user verify this is indeed the entity to link with and link it after. * - * @param {object} entity + * @param {Object} entity * @param {number} siteLinkCount Number of sitelinks attached to the entity * @param {string} itemLink Link to the entity on the repo */ @@ -520,7 +520,7 @@ * Creates a table row for a site link. * * @param {wb.Site} site - * @param {object} entitySitelinks + * @param {Object} entitySitelinks * * @return {jQuery} */ diff --git a/client/resources/wikibase.client.PageConnector.js b/client/resources/wikibase.client.PageConnector.js index 610251c..8799da0 100644 --- a/client/resources/wikibase.client.PageConnector.js +++ b/client/resources/wikibase.client.PageConnector.js @@ -112,9 +112,9 @@ /** * Get the (first) entity object from an API response. * - * @param {object} apiResult + * @param {Object} apiResult * - * @return {object|undefined} Entity as returned by the API + * @return {Object|undefined} Entity as returned by the API */ _extractEntity: function( apiResult ) { for ( var i in apiResult.entities ) { @@ -264,7 +264,7 @@ /** * Links an item with a page. * - * @param {object} entity + * @param {Object} entity * @param {string} siteId * @param {string} pageName * @@ -282,8 +282,8 @@ /** * Merges two entities. * - * @param {object} firstEntity - * @param {object} secondEntity + * @param {Object} firstEntity + * @param {Object} secondEntity * * @return {jQuery.Promise} */ diff --git a/view/tests/qunit/wikibase/templates.tests.js b/view/tests/qunit/wikibase/templates.tests.js index 93c71ce..f6f0a4e 100644 --- a/view/tests/qunit/wikibase/templates.tests.js +++ b/view/tests/qunit/wikibase/templates.tests.js @@ -156,8 +156,8 @@ * Verifies if mw.wbTemplate() delivers an expected result. * * @param {Array} params - * @param {String} template - * @param {String|Array} expected + * @param {string} template + * @param {string|Array} expected */ var verifyTemplate = function( params, template, expected ) { var key = 'test'; @@ -170,8 +170,8 @@ * which seems to be intended. However, for the need of cross-browser comparison we just * convert each < and > character. * - * @param {String} string - * @return {String} + * @param {string} string + * @return {string} */ function replaceChevrons( string ) { return string.replace( /</g, '<' ).replace( />/g, '>' ); -- To view, visit https://gerrit.wikimedia.org/r/243083 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I778389de4122a4ecfc129858e4fcecf04055eae8 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Wikibase Gerrit-Branch: master Gerrit-Owner: Ricordisamoa <[email protected]> _______________________________________________ MediaWiki-commits mailing list [email protected] https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
