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

Change subject: Fix documentation to place @emits in the correct place
......................................................................


Fix documentation to place @emits in the correct place

@emits, @returns, @chainable & @throws should always appear
in that order, according to CODING.md.

Change-Id: I9b192e018a028a8b32730c288cc4e3108800fb58
---
M modules/ve/dm/ve.dm.BranchNode.js
M modules/ve/dm/ve.dm.Node.js
M modules/ve/dm/ve.dm.Surface.js
M modules/ve/ui/layouts/ve.ui.GridLayout.js
M modules/ve/ui/widgets/ve.ui.InputWidget.js
M modules/ve/ve.EventEmitter.js
6 files changed, 8 insertions(+), 8 deletions(-)

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



diff --git a/modules/ve/dm/ve.dm.BranchNode.js 
b/modules/ve/dm/ve.dm.BranchNode.js
index a4a5f06..8ef3fc9 100644
--- a/modules/ve/dm/ve.dm.BranchNode.js
+++ b/modules/ve/dm/ve.dm.BranchNode.js
@@ -116,8 +116,8 @@
  * @param {number} index Index to remove and or insert nodes at
  * @param {number} howmany Number of nodes to remove
  * @param {ve.dm.BranchNode...} [nodes] Variadic list of nodes to insert
- * @returns {ve.dm.BranchNode[]} Removed nodes
  * @emits splice
+ * @returns {ve.dm.BranchNode[]} Removed nodes
  */
 ve.dm.BranchNode.prototype.splice = function () {
        var i,
diff --git a/modules/ve/dm/ve.dm.Node.js b/modules/ve/dm/ve.dm.Node.js
index 25ce142..d92fada 100644
--- a/modules/ve/dm/ve.dm.Node.js
+++ b/modules/ve/dm/ve.dm.Node.js
@@ -436,9 +436,9 @@
  *
  * @method
  * @param {number} length Length of content
- * @throws {Error} Invalid content length error if length is less than 0
  * @emits lengthChange
  * @emits update
+ * @throws {Error} Invalid content length error if length is less than 0
  */
 ve.dm.Node.prototype.setLength = function ( length ) {
        if ( length < 0 ) {
@@ -465,9 +465,9 @@
  *
  * @method
  * @param {number} adjustment Amount to adjust length by
- * @throws {Error} Invalid adjustment error if resulting length is less than 0
  * @emits lengthChange
  * @emits update
+ * @throws {Error} Invalid adjustment error if resulting length is less than 0
  */
 ve.dm.Node.prototype.adjustLength = function ( adjustment ) {
        this.setLength( this.length + adjustment );
diff --git a/modules/ve/dm/ve.dm.Surface.js b/modules/ve/dm/ve.dm.Surface.js
index b81dc90..f053552 100644
--- a/modules/ve/dm/ve.dm.Surface.js
+++ b/modules/ve/dm/ve.dm.Surface.js
@@ -389,10 +389,10 @@
  *
  * @method
  * @see ve.dm.Document#rollback
- * @returns {ve.Range} Selection or null if no further state could be reached
  * @emits lock
  * @emits unlock
  * @emits history
+ * @returns {ve.Range} Selection or null if no further state could be reached
  */
 ve.dm.Surface.prototype.undo = function () {
        if ( !this.enabled ) {
@@ -424,10 +424,10 @@
  *
  * @method
  * @see ve.dm.Document#commit
- * @returns {ve.Range} Selection or null if no further state could be reached
  * @emits lock
  * @emits unlock
  * @emits history
+ * @returns {ve.Range} Selection or null if no further state could be reached
  */
 ve.dm.Surface.prototype.redo = function () {
        if ( !this.enabled ) {
diff --git a/modules/ve/ui/layouts/ve.ui.GridLayout.js 
b/modules/ve/ui/layouts/ve.ui.GridLayout.js
index 98ccd49..95601ae 100644
--- a/modules/ve/ui/layouts/ve.ui.GridLayout.js
+++ b/modules/ve/ui/layouts/ve.ui.GridLayout.js
@@ -75,8 +75,8 @@
  * @method
  * @param {number[]} widths Widths of columns as ratios
  * @param {number[]} heights Heights of rows as ratios
- * @throws {Error} If grid is not large enough to fit all panels
  * @emits layout
+ * @throws {Error} If grid is not large enough to fit all panels
  */
 ve.ui.GridLayout.prototype.layout = function ( widths, heights ) {
        var x, y,
diff --git a/modules/ve/ui/widgets/ve.ui.InputWidget.js 
b/modules/ve/ui/widgets/ve.ui.InputWidget.js
index 6ddfd9a..8601777 100644
--- a/modules/ve/ui/widgets/ve.ui.InputWidget.js
+++ b/modules/ve/ui/widgets/ve.ui.InputWidget.js
@@ -97,8 +97,8 @@
  *
  * @method
  * @param {string} value New value
- * @chainable
  * @emits change
+ * @chainable
  */
 ve.ui.InputWidget.prototype.setValue = function ( value ) {
        var domValue = this.$input.val();
diff --git a/modules/ve/ve.EventEmitter.js b/modules/ve/ve.EventEmitter.js
index b5b3c9a..ca1bd28 100644
--- a/modules/ve/ve.EventEmitter.js
+++ b/modules/ve/ve.EventEmitter.js
@@ -59,8 +59,8 @@
  * @method
  * @param {string} type Type of event to listen to
  * @param {Function} listener Listener to call when event occurs
- * @chainable
  * @emits newListener
+ * @chainable
  * @throws {Error} Listener argument is not a function
  */
 ve.EventEmitter.prototype.addListener = function ( type, listener ) {

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I9b192e018a028a8b32730c288cc4e3108800fb58
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/VisualEditor
Gerrit-Branch: master
Gerrit-Owner: Esanders <[email protected]>
Gerrit-Reviewer: Krinkle <[email protected]>
Gerrit-Reviewer: jenkins-bot

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

Reply via email to