jenkins-bot has submitted this change and it was merged. Change subject: eslint: Remove upstreamed rules and fix documentation ......................................................................
eslint: Remove upstreamed rules and fix documentation Don't enable valid-jsdoc yet though, due to @chainable bug. Change-Id: I8665a6ab60d5319661d299832db9cae703440835 --- M .eslintrc.json M build/tasks/colorize-svg.js M demos/pages/widgets.js M src/Process.js M src/Theme.js M src/WindowManager.js M src/layouts/ActionFieldLayout.js M src/mixins/DraggableElement.js M src/toolgroups/PopupToolGroup.js M src/widgets/CapsuleItemWidget.js M tests/QUnit.assert.equalDomElement.js 11 files changed, 25 insertions(+), 8 deletions(-) Approvals: Jforrester: Looks good to me, approved jenkins-bot: Verified diff --git a/.eslintrc.json b/.eslintrc.json index 867ba3c..bb22a9a 100644 --- a/.eslintrc.json +++ b/.eslintrc.json @@ -15,8 +15,6 @@ "rules": { "dot-notation": 0, "valid-jsdoc": 0, - "wrap-iife": 0, - "spaced-comment": ["error", "always", { "exceptions": ["*", "!"] }], - "no-use-before-define": ["error", { "functions": false, "classes": true }] + "wrap-iife": 0 } } diff --git a/build/tasks/colorize-svg.js b/build/tasks/colorize-svg.js index 35b5c5d..952af2b 100644 --- a/build/tasks/colorize-svg.js +++ b/build/tasks/colorize-svg.js @@ -5,6 +5,8 @@ * An option to do it may be added in the future. */ +/* eslint-disable no-use-before-define */ + var Q = require( 'q' ), path = require( 'path' ), asyncTask = require( 'grunt-promise-q' ); diff --git a/demos/pages/widgets.js b/demos/pages/widgets.js index 7329105..e5efd51 100644 --- a/demos/pages/widgets.js +++ b/demos/pages/widgets.js @@ -95,8 +95,12 @@ /** * Demo for LookupElement. * + * @class * @extends OO.ui.TextInputWidget * @mixins OO.ui.mixin.LookupElement + * + * @constructor + * @param {Object} config Configuration options */ function NumberLookupTextInputWidget( config ) { // Parent constructor diff --git a/src/Process.js b/src/Process.js index 649ffb9..49212f8 100644 --- a/src/Process.js +++ b/src/Process.js @@ -20,7 +20,6 @@ * that must be resolved before proceeding, or a function to execute. See #createStep for more information. see #createStep for more information * @param {Object} [context=null] Execution context of the function. The context is ignored if the step is * a number or promise. - * @return {Object} Step object, with `callback` and `context` properties */ OO.ui.Process = function ( step, context ) { // Properties diff --git a/src/Theme.js b/src/Theme.js index a4f0b06..e0a6d82 100644 --- a/src/Theme.js +++ b/src/Theme.js @@ -33,7 +33,6 @@ * For elements with theme logic hooks, this should be called any time there's a state change. * * @param {OO.ui.Element} element Element for which to update classes - * @return {Object.<string,string[]>} Categorized class names with `on` and `off` lists */ OO.ui.Theme.prototype.updateElementClasses = function ( element ) { var $elements = $( [] ), diff --git a/src/WindowManager.js b/src/WindowManager.js index 77e8cc0..ad366f2 100644 --- a/src/WindowManager.js +++ b/src/WindowManager.js @@ -192,6 +192,7 @@ /** * Check if window is opening. * + * @param {OO.ui.Window} win Window to check * @return {boolean} Window is opening */ OO.ui.WindowManager.prototype.isOpening = function ( win ) { @@ -201,6 +202,7 @@ /** * Check if window is closing. * + * @param {OO.ui.Window} win Window to check * @return {boolean} Window is closing */ OO.ui.WindowManager.prototype.isClosing = function ( win ) { @@ -210,6 +212,7 @@ /** * Check if window is opened. * + * @param {OO.ui.Window} win Window to check * @return {boolean} Window is opened */ OO.ui.WindowManager.prototype.isOpened = function ( win ) { @@ -568,6 +571,7 @@ * * Fullscreen mode will be used if the dialog is too wide to fit in the screen. * + * @param {OO.ui.Window} win Window to update, should be the current window * @chainable */ OO.ui.WindowManager.prototype.updateWindowSize = function ( win ) { diff --git a/src/layouts/ActionFieldLayout.js b/src/layouts/ActionFieldLayout.js index b3c8229..1744d35 100644 --- a/src/layouts/ActionFieldLayout.js +++ b/src/layouts/ActionFieldLayout.js @@ -42,6 +42,7 @@ * @constructor * @param {OO.ui.Widget} fieldWidget Field widget * @param {OO.ui.ButtonWidget} buttonWidget Button widget + * @param {Object} config */ OO.ui.ActionFieldLayout = function OoUiActionFieldLayout( fieldWidget, buttonWidget, config ) { // Allow passing positional parameters inside the config object diff --git a/src/mixins/DraggableElement.js b/src/mixins/DraggableElement.js index 5bd3399..b442f0c 100644 --- a/src/mixins/DraggableElement.js +++ b/src/mixins/DraggableElement.js @@ -71,7 +71,7 @@ * Respond to mousedown event. * * @private - * @param {jQuery.Event} e jQuery event + * @param {jQuery.Event} e Drag event */ OO.ui.mixin.DraggableElement.prototype.onDragMouseDown = function ( e ) { this.wasHandleUsed = @@ -85,7 +85,8 @@ * Respond to dragstart event. * * @private - * @param {jQuery.Event} e jQuery event + * @param {jQuery.Event} e Drag event + * @return {boolean} False if the event is cancelled * @fires dragstart */ OO.ui.mixin.DraggableElement.prototype.onDragStart = function ( e ) { @@ -135,7 +136,7 @@ * Handle drop event. * * @private - * @param {jQuery.Event} e jQuery event + * @param {jQuery.Event} e Drop event * @fires drop */ OO.ui.mixin.DraggableElement.prototype.onDrop = function ( e ) { @@ -147,6 +148,7 @@ * In order for drag/drop to work, the dragover event must * return false and stop propogation. * + * @param {jQuery.Event} e Drag event * @private */ OO.ui.mixin.DraggableElement.prototype.onDragOver = function ( e ) { diff --git a/src/toolgroups/PopupToolGroup.js b/src/toolgroups/PopupToolGroup.js index b2099f7..0c727c0 100644 --- a/src/toolgroups/PopupToolGroup.js +++ b/src/toolgroups/PopupToolGroup.js @@ -161,6 +161,8 @@ * * When active, the popup is visible. A mouseup event anywhere in the document will trigger * deactivation. + * + * @param {boolean} value The active state to set */ OO.ui.PopupToolGroup.prototype.setActive = function ( value ) { var containerWidth, containerLeft; diff --git a/src/widgets/CapsuleItemWidget.js b/src/widgets/CapsuleItemWidget.js index 1b77335..5dc852b 100644 --- a/src/widgets/CapsuleItemWidget.js +++ b/src/widgets/CapsuleItemWidget.js @@ -81,6 +81,8 @@ /** * Handle keyDown event for the entire capsule + * + * @param {jQuery.Event} e Key down event */ OO.ui.CapsuleItemWidget.prototype.onKeyDown = function ( e ) { var element = this.getElementGroup(); diff --git a/tests/QUnit.assert.equalDomElement.js b/tests/QUnit.assert.equalDomElement.js index c9e081d..2d07cfa 100644 --- a/tests/QUnit.assert.equalDomElement.js +++ b/tests/QUnit.assert.equalDomElement.js @@ -89,6 +89,10 @@ /** * @method * @static + * @param {HTMLElement} actual + * @param {HTMLElement} expected + * @param {string} message + * @param {boolean} stringify [description] */ QUnit.assert.equalDomElement = function ( actual, expected, message, stringify ) { var actualSummary = getDomElementSummary( actual ), -- To view, visit https://gerrit.wikimedia.org/r/318573 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I8665a6ab60d5319661d299832db9cae703440835 Gerrit-PatchSet: 2 Gerrit-Project: oojs/ui Gerrit-Branch: master Gerrit-Owner: Esanders <esand...@wikimedia.org> Gerrit-Reviewer: Jforrester <jforres...@wikimedia.org> Gerrit-Reviewer: jenkins-bot <> _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits