jenkins-bot has submitted this change and it was merged. Change subject: Fix jscs and jsdoc warnings ......................................................................
Fix jscs and jsdoc warnings Change-Id: Id27936d5685707f34c99bb1513399232564362f8 --- M resources/ext.quicksurveys.views/QuickSurvey.js M resources/ext.quicksurveys.views/utils.js 2 files changed, 15 insertions(+), 9 deletions(-) Approvals: Phuedx: Looks good to me, approved jenkins-bot: Verified diff --git a/resources/ext.quicksurveys.views/QuickSurvey.js b/resources/ext.quicksurveys.views/QuickSurvey.js index 91a635d..f3b5f06 100644 --- a/resources/ext.quicksurveys.views/QuickSurvey.js +++ b/resources/ext.quicksurveys.views/QuickSurvey.js @@ -3,7 +3,7 @@ /** * @class QuickSurvey - * @inherit OO.ui.StackLayout + * @extends OO.ui.StackLayout */ function QuickSurvey( config ) { this.initialize( config ); @@ -59,6 +59,7 @@ }, /** * Initialise a widget. + * * @param {Object} config */ initialize: function ( config ) { @@ -104,19 +105,20 @@ */ widget: function ( widgetName, templatePartialName, options ) { var template, - config = $.extend( {}, this.config[widgetName], options ); + config = $.extend( {}, this.config[ widgetName ], options ); if ( templatePartialName ) { - template = this.templatePartials[templatePartialName]; + template = this.templatePartials[ templatePartialName ]; if ( template ) { config.$content = template.render( this.config.templateData ); } } - return new OO.ui[widgetName]( config ); + return new OO.ui[ widgetName ]( config ); }, /** * Log the answer to Schema:QuickSurveysResponses - * @see https://meta.wikimedia.org/wiki/Schema:QuickSurveysResponses + * See {@link https://meta.wikimedia.org/wiki/Schema:QuickSurveysResponses} + * * @param {String} answer * @return {jQuery.Deferred} */ @@ -139,6 +141,7 @@ }, /** * Fired when one of the options are clicked. + * * @param {OO.ui.ButtonOptionWidget} btn */ onChoose: function ( btn ) { diff --git a/resources/ext.quicksurveys.views/utils.js b/resources/ext.quicksurveys.views/utils.js index 42228c3..fd0b727 100644 --- a/resources/ext.quicksurveys.views/utils.js +++ b/resources/ext.quicksurveys.views/utils.js @@ -1,11 +1,12 @@ ( function () { /** * Extends a class with new methods and member properties. + * FIXME: Talk about upstreaming this to oojs ui as a utility function. * + * @param {Class} ChildClass to extend. * @param {OO.Class} ParentClass to extend. * @param {Object} prototype Prototype that should be incorporated into the new Class. * @ignore - * FIXME: Talk about upstreaming this to oojs ui as a utility function. * @return {Class} */ function extend( ChildClass, ParentClass, prototype ) { @@ -13,15 +14,16 @@ OO.inheritClass( ChildClass, ParentClass ); for ( key in prototype ) { - ChildClass.prototype[key] = prototype[key]; + ChildClass.prototype[ key ] = prototype[ key ]; } return ChildClass; } /** * Return edit count bucket based on the number of edits + * * @param {Number} editCount - * @returns {String} + * @return {String} */ function getEditCountBucket( editCount ) { var bucket; @@ -44,7 +46,8 @@ /** * Return two letter country code from the GeoIP cookie. * Return 'Unknown' if the cookie is not set. - * @returns {String} + * + * @return {String} */ function getCountryCode() { var geoIP = mw.cookie.get( 'GeoIP', '' ); -- To view, visit https://gerrit.wikimedia.org/r/233652 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Id27936d5685707f34c99bb1513399232564362f8 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/QuickSurveys Gerrit-Branch: dev Gerrit-Owner: Bmansurov <bmansu...@wikimedia.org> Gerrit-Reviewer: Phuedx <g...@samsmith.io> Gerrit-Reviewer: jenkins-bot <> _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits