Ricordisamoa has uploaded a new change for review.

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

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

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

Change-Id: I22c4fec2a2824b247cca439a3b91b33c549c2730
---
M .jscsrc
M demos/pages/widgets.js
M src/Element.js
M src/ToolGroupFactory.js
M src/layouts/BookletLayout.js
M src/layouts/FieldLayout.js
M src/layouts/IndexLayout.js
M src/mixins/ButtonElement.js
M src/widgets/CapsuleMultiSelectWidget.js
M src/widgets/ComboBoxInputWidget.js
M src/widgets/MenuSelectWidget.js
M src/widgets/NumberInputWidget.js
M src/widgets/PopupWidget.js
13 files changed, 37 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/oojs/ui refs/changes/40/273940/1

diff --git a/.jscsrc b/.jscsrc
index 80ac550..427f932 100644
--- a/.jscsrc
+++ b/.jscsrc
@@ -8,6 +8,7 @@
                        }
                },
                "checkParamNames": true,
-               "requireReturnTypes": true
+               "requireReturnTypes": true,
+               "requireNewlineAfterDescription": true
        }
 }
diff --git a/demos/pages/widgets.js b/demos/pages/widgets.js
index f9301b6..b13108a 100644
--- a/demos/pages/widgets.js
+++ b/demos/pages/widgets.js
@@ -7,6 +7,7 @@
 
        /**
         * Draggable group widget containing drag/drop items
+        *
         * @param {Object} [config] Configuration options
         */
        function DraggableGroupWidget( config ) {
@@ -26,6 +27,7 @@
 
        /**
         * Drag/drop items
+        *
         * @param {Object} [config] Configuration options
         */
        function DraggableItemWidget( config ) {
@@ -64,6 +66,7 @@
 
        /**
         * Demo for LookupElement.
+        *
         * @extends OO.ui.TextInputWidget
         * @mixins OO.ui.mixin.LookupElement
         */
diff --git a/src/Element.js b/src/Element.js
index 50169f8..c533e50 100644
--- a/src/Element.js
+++ b/src/Element.js
@@ -114,6 +114,7 @@
 /**
  * Implementation helper for `infuse`; skips the type check and has an
  * extra property so that only the top-level invocation touches the DOM.
+ *
  * @private
  * @param {string|HTMLElement|jQuery} idOrNode
  * @param {jQuery.Promise|boolean} domPromise A promise that will be resolved
@@ -801,6 +802,7 @@
 
 /**
  * Check if the element is attached to the DOM
+ *
  * @return {boolean} The element is attached to the DOM
  */
 OO.ui.Element.prototype.isElementAttached = function () {
diff --git a/src/ToolGroupFactory.js b/src/ToolGroupFactory.js
index b3eef5f..6cb5a48 100644
--- a/src/ToolGroupFactory.js
+++ b/src/ToolGroupFactory.js
@@ -12,6 +12,7 @@
  * For more information about toolbars in general, please see the [OOjs UI 
documentation on MediaWiki][1].
  *
  * [1]: https://www.mediawiki.org/wiki/OOjs_UI/Toolbars
+ *
  * @class
  * @extends OO.Factory
  * @constructor
diff --git a/src/layouts/BookletLayout.js b/src/layouts/BookletLayout.js
index da00cbb..22446d0 100644
--- a/src/layouts/BookletLayout.js
+++ b/src/layouts/BookletLayout.js
@@ -194,6 +194,7 @@
  *
  * If no page is selected, the first selectable page will be selected.
  * If the focus is already in an element on the current page, nothing will 
happen.
+ *
  * @param {number} [itemIndex] A specific item to focus on
  */
 OO.ui.BookletLayout.prototype.focus = function ( itemIndex ) {
diff --git a/src/layouts/FieldLayout.js b/src/layouts/FieldLayout.js
index 4df173b..abffd14 100644
--- a/src/layouts/FieldLayout.js
+++ b/src/layouts/FieldLayout.js
@@ -18,6 +18,7 @@
  * Please see the [OOjs UI documentation on MediaWiki] [1] for examples and 
more information.
  *
  * [1]: https://www.mediawiki.org/wiki/OOjs_UI/Layouts/Fields_and_Fieldsets
+ *
  * @class
  * @extends OO.ui.Layout
  * @mixins OO.ui.mixin.LabelElement
diff --git a/src/layouts/IndexLayout.js b/src/layouts/IndexLayout.js
index 1e0e939..a639413 100644
--- a/src/layouts/IndexLayout.js
+++ b/src/layouts/IndexLayout.js
@@ -150,6 +150,7 @@
  *
  * If no card is selected, the first selectable card will be selected.
  * If the focus is already in an element on the current card, nothing will 
happen.
+ *
  * @param {number} [itemIndex] A specific item to focus on
  */
 OO.ui.IndexLayout.prototype.focus = function ( itemIndex ) {
diff --git a/src/mixins/ButtonElement.js b/src/mixins/ButtonElement.js
index bf0de01..e8ac8d8 100644
--- a/src/mixins/ButtonElement.js
+++ b/src/mixins/ButtonElement.js
@@ -4,6 +4,7 @@
  * See the [OOjs UI documentation on MediaWiki] [1] for examples.
  *
  * [1]: 
https://www.mediawiki.org/wiki/OOjs_UI/Widgets/Buttons_and_Switches#Buttons
+ *
  * @abstract
  * @class
  *
diff --git a/src/widgets/CapsuleMultiSelectWidget.js 
b/src/widgets/CapsuleMultiSelectWidget.js
index 4c87b9c..53dab89 100644
--- a/src/widgets/CapsuleMultiSelectWidget.js
+++ b/src/widgets/CapsuleMultiSelectWidget.js
@@ -206,6 +206,7 @@
 
 /**
  * Get the data of the items in the capsule
+ *
  * @return {Mixed[]}
  */
 OO.ui.CapsuleMultiSelectWidget.prototype.getItemsData = function () {
@@ -214,6 +215,7 @@
 
 /**
  * Set the items in the capsule by providing data
+ *
  * @chainable
  * @param {Mixed[]} datas
  * @return {OO.ui.CapsuleMultiSelectWidget}
@@ -258,6 +260,7 @@
 
 /**
  * Add items to the capsule by providing their data
+ *
  * @chainable
  * @param {Mixed[]} datas
  * @return {OO.ui.CapsuleMultiSelectWidget}
@@ -289,6 +292,7 @@
 
 /**
  * Add items to the capsule by providing a label
+ *
  * @param {string} label
  * @return {boolean} Whether the item was added or not
  */
@@ -306,6 +310,7 @@
 
 /**
  * Remove items by data
+ *
  * @chainable
  * @param {Mixed[]} datas
  * @return {OO.ui.CapsuleMultiSelectWidget}
@@ -454,6 +459,7 @@
 
 /**
  * Get the capsule widget's menu.
+ *
  * @return {OO.ui.MenuSelectWidget} Menu widget
  */
 OO.ui.CapsuleMultiSelectWidget.prototype.getMenu = function () {
@@ -656,6 +662,7 @@
 
 /**
  * Clear the input field
+ *
  * @private
  */
 OO.ui.CapsuleMultiSelectWidget.prototype.clearInput = function () {
@@ -701,6 +708,7 @@
 
 /**
  * Focus the widget
+ *
  * @chainable
  * @return {OO.ui.CapsuleMultiSelectWidget}
  */
diff --git a/src/widgets/ComboBoxInputWidget.js 
b/src/widgets/ComboBoxInputWidget.js
index d32dd73..d2ebfe7 100644
--- a/src/widgets/ComboBoxInputWidget.js
+++ b/src/widgets/ComboBoxInputWidget.js
@@ -120,6 +120,7 @@
 
 /**
  * Get the combobox's menu.
+ *
  * @return {OO.ui.FloatingMenuSelectWidget} Menu widget
  */
 OO.ui.ComboBoxInputWidget.prototype.getMenu = function () {
@@ -128,6 +129,7 @@
 
 /**
  * Get the combobox's text input widget.
+ *
  * @return {OO.ui.TextInputWidget} Text input widget
  */
 OO.ui.ComboBoxInputWidget.prototype.getInput = function () {
diff --git a/src/widgets/MenuSelectWidget.js b/src/widgets/MenuSelectWidget.js
index 003abca..b23301a 100644
--- a/src/widgets/MenuSelectWidget.js
+++ b/src/widgets/MenuSelectWidget.js
@@ -125,6 +125,7 @@
 
 /**
  * Update menu item visibility after input changes.
+ *
  * @protected
  */
 OO.ui.MenuSelectWidget.prototype.updateItemVisibility = function () {
@@ -200,6 +201,7 @@
  *
  * Note that ‘choose’ should never be modified programmatically. A user can 
choose an option with the keyboard
  * or mouse and it becomes selected. To select an item programmatically, use 
the #selectItem method.
+ *
  * @param {OO.ui.OptionWidget} item Item to choose
  * @chainable
  */
diff --git a/src/widgets/NumberInputWidget.js b/src/widgets/NumberInputWidget.js
index 907ad38..49e4c3f 100644
--- a/src/widgets/NumberInputWidget.js
+++ b/src/widgets/NumberInputWidget.js
@@ -123,6 +123,7 @@
 
 /**
  * Set whether only integers are allowed
+ *
  * @param {boolean} flag
  */
 OO.ui.NumberInputWidget.prototype.setIsInteger = function ( flag ) {
@@ -132,6 +133,7 @@
 
 /**
  * Get whether only integers are allowed
+ *
  * @return {boolean} Flag value
  */
 OO.ui.NumberInputWidget.prototype.getIsInteger = function () {
@@ -140,6 +142,7 @@
 
 /**
  * Set the range of allowed values
+ *
  * @param {number} min Minimum allowed value
  * @param {number} max Maximum allowed value
  */
@@ -154,6 +157,7 @@
 
 /**
  * Get the current range
+ *
  * @return {number[]} Minimum and maximum values
  */
 OO.ui.NumberInputWidget.prototype.getRange = function () {
@@ -162,6 +166,7 @@
 
 /**
  * Set the stepping deltas
+ *
  * @param {number} step Normal step
  * @param {number|null} pageStep Page step. If null, 10 * step will be used.
  */
@@ -180,6 +185,7 @@
 
 /**
  * Get the current stepping values
+ *
  * @return {number[]} Step and page step
  */
 OO.ui.NumberInputWidget.prototype.getStep = function () {
@@ -188,6 +194,7 @@
 
 /**
  * Get the current value of the widget
+ *
  * @return {string}
  */
 OO.ui.NumberInputWidget.prototype.getValue = function () {
@@ -196,6 +203,7 @@
 
 /**
  * Get the current value of the widget as a number
+ *
  * @return {number} May be NaN, or an invalid number
  */
 OO.ui.NumberInputWidget.prototype.getNumericValue = function () {
@@ -204,6 +212,7 @@
 
 /**
  * Set the value of the widget
+ *
  * @param {string} value Invalid values are allowed
  */
 OO.ui.NumberInputWidget.prototype.setValue = function ( value ) {
@@ -212,6 +221,7 @@
 
 /**
  * Adjust the value of the widget
+ *
  * @param {number} delta Adjustment amount
  */
 OO.ui.NumberInputWidget.prototype.adjustValue = function ( delta ) {
@@ -239,6 +249,7 @@
 
 /**
  * Validate input
+ *
  * @private
  * @param {string} value Field value
  * @return {boolean}
diff --git a/src/widgets/PopupWidget.js b/src/widgets/PopupWidget.js
index 1afddde..332d3e6 100644
--- a/src/widgets/PopupWidget.js
+++ b/src/widgets/PopupWidget.js
@@ -386,6 +386,7 @@
 
 /**
  * Set popup alignment
+ *
  * @param {string} align Alignment of the popup, `center`, `force-left`, 
`force-right`,
  *  `backwards` or `forwards`.
  */
@@ -400,6 +401,7 @@
 
 /**
  * Get popup alignment
+ *
  * @return {string} align Alignment of the popup, `center`, `force-left`, 
`force-right`,
  *  `backwards` or `forwards`.
  */

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I22c4fec2a2824b247cca439a3b91b33c549c2730
Gerrit-PatchSet: 1
Gerrit-Project: oojs/ui
Gerrit-Branch: master
Gerrit-Owner: Ricordisamoa <[email protected]>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to