Closed Bug 1195343 Opened 9 years ago Closed 9 years ago

document RuleModificationList

Categories

(DevTools :: Inspector, defect)

defect
Not set
normal

Tracking

(firefox43 fixed)

RESOLVED FIXED
Firefox 43
Tracking Status
firefox43 --- fixed

People

(Reporter: tromey, Assigned: tromey)

References

Details

Attachments

(1 file, 1 obsolete file)

As part of bug 984880 I noticed that RuleModificationList doesn't
have documentation comments.
Attachment #8648755 - Flags: review?(pbrosset)
Comment on attachment 8648755 [details] [diff] [review]
update RuleModificationList comments

Review of attachment 8648755 [details] [diff] [review]:
-----------------------------------------------------------------

Thanks for clarifying the doc for this class.
The jsdoc syntax needs some updates, but nothing that requires me to review the patch again, so r=me with those fixed.

::: toolkit/devtools/server/actors/styles.js
@@ +1455,5 @@
>   */
>  let RuleModificationList = Class({
> +  /**
> +   * Initialize a RuleModificationList.
> +   * @param rule {StyleRuleFront} the associated rule

There's a jsdoc validator rule in ESLint but unfortunately it has some problems so I've had to turn it off for now. We should revisit this in some time. Anyway, this to say that jsdoc comment have a specific syntax and I think it's:

@param {Type} paramName Description

So here it should instead be:

@param {StyleRuleFront} rule The associated rule.

Same comment for other params further in the file.

@@ +1465,5 @@
>  
> +  /**
> +   * Apply the modifications in this object to the associated rule.
> +   *
> +   * @return a promise which will be resolved when the modifications

I think it also helps documenting the return type:

@return {Promise} A promise which will be resolved ...
Attachment #8648755 - Flags: review?(pbrosset) → review+
Updated per review.
Attachment #8648755 - Attachment is obsolete: true
Attachment #8649488 - Flags: review+
This is just some comment additions in a .js file, so I believe it doesn't
need a try build.
Keywords: checkin-needed
https://hg.mozilla.org/mozilla-central/rev/f6aaf8d447d3
Status: ASSIGNED → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 43
Product: Firefox → DevTools
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: