Ricordisamoa has uploaded a new change for review.
https://gerrit.wikimedia.org/r/273845
Change subject: build: Enable jscs jsDoc rule 'checkParamNames' and make pass
......................................................................
build: Enable jscs jsDoc rule 'checkParamNames' and make pass
Change-Id: Ib7861424b29a3fb6e78cf4cff7ac088bdf838328
---
M .jscsrc
M build/tasks/colorize-svg.js
M src/ActionSet.js
M src/Element.js
M src/core.js
M src/layouts/CardLayout.js
M src/layouts/PageLayout.js
M src/mixins/AccessKeyedElement.js
M src/mixins/DraggableElement.js
M src/mixins/DraggableGroupElement.js
M src/mixins/IndicatorElement.js
M src/widgets/SelectFileWidget.js
12 files changed, 17 insertions(+), 15 deletions(-)
git pull ssh://gerrit.wikimedia.org:29418/oojs/ui refs/changes/45/273845/1
diff --git a/.jscsrc b/.jscsrc
index 12daf8b..7236660 100644
--- a/.jscsrc
+++ b/.jscsrc
@@ -1,4 +1,6 @@
{
"preset": "wikimedia",
- "jsDoc": null
+ "jsDoc": {
+ "checkParamNames": true
+ }
}
diff --git a/build/tasks/colorize-svg.js b/build/tasks/colorize-svg.js
index 4cc00e7..b31a87d 100644
--- a/build/tasks/colorize-svg.js
+++ b/build/tasks/colorize-svg.js
@@ -493,7 +493,7 @@
* @class
*
* @constructor
- * @param {Object} list List of variant configurations keyed by name
+ * @param {Object} data List of variant configurations keyed by name
*/
function VariantList( data ) {
var key;
diff --git a/src/ActionSet.js b/src/ActionSet.js
index acacbf8..b8b0533 100644
--- a/src/ActionSet.js
+++ b/src/ActionSet.js
@@ -340,7 +340,7 @@
* When making changes to multiple actions, use this method instead of
iterating over the actions
* manually to defer emitting a #change event until after all actions have
been changed.
*
- * @param {Object|null} actions Filters to use to determine which actions to
iterate over; see #get
+ * @param {Object|null} filter Filters to use to determine which actions to
iterate over; see #get
* @param {Function} callback Callback to run for each action; callback is
invoked with three
* arguments: the action, the action's index, the list of actions being
iterated over
* @chainable
diff --git a/src/Element.js b/src/Element.js
index edd1070..50169f8 100644
--- a/src/Element.js
+++ b/src/Element.js
@@ -740,7 +740,7 @@
/**
* Set element data.
*
- * @param {Mixed} Element data
+ * @param {Mixed} data Element data
* @chainable
*/
OO.ui.Element.prototype.setData = function ( data ) {
diff --git a/src/core.js b/src/core.js
index ba80c86..a7fee1d 100644
--- a/src/core.js
+++ b/src/core.js
@@ -60,7 +60,7 @@
* Check if an element is focusable.
* Inspired from :focusable in jQueryUI v1.11.4 - 2015-04-14
*
- * @param {jQuery} element Element to test
+ * @param {jQuery} $element Element to test
* @return {boolean}
*/
OO.ui.isFocusableElement = function ( $element ) {
diff --git a/src/layouts/CardLayout.js b/src/layouts/CardLayout.js
index 4f7e290..a14681d 100644
--- a/src/layouts/CardLayout.js
+++ b/src/layouts/CardLayout.js
@@ -129,7 +129,7 @@
* CSS is applied to the tab item to reflect the card's active state. Outside
of the index
* context, setting the active state on a card does nothing.
*
- * @param {boolean} value Card is active
+ * @param {boolean} active Card is active
* @fires active
*/
OO.ui.CardLayout.prototype.setActive = function ( active ) {
diff --git a/src/layouts/PageLayout.js b/src/layouts/PageLayout.js
index be26e97..d2faf10 100644
--- a/src/layouts/PageLayout.js
+++ b/src/layouts/PageLayout.js
@@ -124,7 +124,7 @@
* CSS is applied to the outline item to reflect the page's active state.
Outside of the booklet
* context, setting the active state on a page does nothing.
*
- * @param {boolean} value Page is active
+ * @param {boolean} active Page is active
* @fires active
*/
OO.ui.PageLayout.prototype.setActive = function ( active ) {
diff --git a/src/mixins/AccessKeyedElement.js b/src/mixins/AccessKeyedElement.js
index d672dab..0c6332a 100644
--- a/src/mixins/AccessKeyedElement.js
+++ b/src/mixins/AccessKeyedElement.js
@@ -76,7 +76,7 @@
/**
* Set accesskey.
*
- * @param {string|Function|null} accesskey Key, a function that returns a key,
or `null` for no accesskey
+ * @param {string|Function|null} accessKey Key, a function that returns a key,
or `null` for no accesskey
* @chainable
*/
OO.ui.mixin.AccessKeyedElement.prototype.setAccessKey = function ( accessKey )
{
diff --git a/src/mixins/DraggableElement.js b/src/mixins/DraggableElement.js
index e9e3f51..5bd3399 100644
--- a/src/mixins/DraggableElement.js
+++ b/src/mixins/DraggableElement.js
@@ -71,7 +71,7 @@
* Respond to mousedown event.
*
* @private
- * @param {jQuery.Event} event jQuery event
+ * @param {jQuery.Event} e jQuery event
*/
OO.ui.mixin.DraggableElement.prototype.onDragMouseDown = function ( e ) {
this.wasHandleUsed =
@@ -85,7 +85,7 @@
* Respond to dragstart event.
*
* @private
- * @param {jQuery.Event} event jQuery event
+ * @param {jQuery.Event} e jQuery event
* @fires dragstart
*/
OO.ui.mixin.DraggableElement.prototype.onDragStart = function ( e ) {
@@ -135,7 +135,7 @@
* Handle drop event.
*
* @private
- * @param {jQuery.Event} event jQuery event
+ * @param {jQuery.Event} e jQuery event
* @fires drop
*/
OO.ui.mixin.DraggableElement.prototype.onDrop = function ( e ) {
@@ -158,7 +158,7 @@
* Store it in the DOM so we can access from the widget drag event
*
* @private
- * @param {number} Item index
+ * @param {number} index Item index
*/
OO.ui.mixin.DraggableElement.prototype.setIndex = function ( index ) {
if ( this.index !== index ) {
diff --git a/src/mixins/DraggableGroupElement.js
b/src/mixins/DraggableGroupElement.js
index 28728ae..cac7422 100644
--- a/src/mixins/DraggableGroupElement.js
+++ b/src/mixins/DraggableGroupElement.js
@@ -135,7 +135,7 @@
* Respond to dragover event
*
* @private
- * @param {jQuery.Event} event Dragover event
+ * @param {jQuery.Event} e Dragover event
* @fires reorder
*/
OO.ui.mixin.DraggableGroupElement.prototype.onDragOver = function ( e ) {
diff --git a/src/mixins/IndicatorElement.js b/src/mixins/IndicatorElement.js
index b8c04f2..953584d 100644
--- a/src/mixins/IndicatorElement.js
+++ b/src/mixins/IndicatorElement.js
@@ -126,7 +126,7 @@
*
* The title is displayed when a user moves the mouse over the indicator.
*
- * @param {string|Function|null} indicator Indicator title text, a function
that returns text, or
+ * @param {string|Function|null} indicatorTitle Indicator title text, a
function that returns text, or
* `null` for no indicator title
* @chainable
*/
diff --git a/src/widgets/SelectFileWidget.js b/src/widgets/SelectFileWidget.js
index 7ac83b4..a34c0ef 100644
--- a/src/widgets/SelectFileWidget.js
+++ b/src/widgets/SelectFileWidget.js
@@ -336,7 +336,7 @@
* Determine if we should accept this file
*
* @private
- * @param {string} File MIME type
+ * @param {string} mimeType File MIME type
* @return {boolean}
*/
OO.ui.SelectFileWidget.prototype.isAllowedType = function ( mimeType ) {
--
To view, visit https://gerrit.wikimedia.org/r/273845
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: Ib7861424b29a3fb6e78cf4cff7ac088bdf838328
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