Closed Bug 2082314 Opened 1 month ago Closed 1 month ago

Tell the documentation skill what to name an options parameter and where to document a runtime check in a generated API page

Categories

(Developer Infrastructure :: AI for Development, task)

task

Tracking

(firefox160 fixed)

RESOLVED FIXED
160 Branch
Tracking Status
firefox160 --- fixed

People

(Reporter: dao, Assigned: dao)

References

Details

Attachments

(1 external file)

On a generated API page, the name a JSDoc comment gives a destructured parameter is printed in front of every property under it, so options, opts and params all show up in the rendered API. The documentation skill already notes this in references/js-api-references.md but gives no naming rule.

Proposed rule: call the parameter options, whether it is destructured or not, unless the function takes two bags or passes one through to another call; there, name it for the call it belongs to, such as loadOptions.

Split out of bug 2071292, where review pointed out that this is a style convention rather than a fix for a page that renders wrong.

Assignee: nobody → dao+bmo
Status: NEW → ASSIGNED
Summary: Tell the documentation skill what to name an options parameter in a generated API page → Tell the documentation skill what to name an options parameter and where to document a runtime check in a generated API page
Attachment #9661201 - Attachment description: Bug 2082314 - Tell the documentation skill what to name an options parameter in a generated API page. r?sylvestre! DONTBUILD → Bug 2082314 - Tell the documentation skill what to name an options parameter and where to document a runtime check in a generated API page. r?sylvestre! DONTBUILD
Pushed by dgottwald@mozilla.com: https://github.com/mozilla-firefox/firefox/commit/d55b0da63c14 https://hg.mozilla.org/integration/autoland/rev/56182af9e1c8 Tell the documentation skill what to name an options parameter and where to document a runtime check in a generated API page. r=sylvestre DONTBUILD
Status: ASSIGNED → RESOLVED
Closed: 1 month ago
Resolution: --- → FIXED
Target Milestone: --- → 160 Branch
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: