Naming conventions for properties in returned objects
Nobody has claimed this yet.
- Dominant language
- JSON
- Stars
- 5.8k
- Forks
- 2.6k
- Avg merge
- 1d 21h
- Merged PRs (30d)
- 186
Description
In #12840, @ddbeck and @foolip had been discussing a convention for the properties in the objects returned by certain methods. Quoting the conversation here:
Since we don't have a guideline, maybe this is an opportunity to start from scratch? How about
returns_audioCapabilities_propertywith the idea being that we could have a convention for object properties (like this one), types (likereturns_DOMMatrix_type), and values (likereturns_undefined_value).We should probably put the word return in the description too.
Returns <code>audioCapabilities</code> property?
Originally posted by @ddbeck in https://github.com/mdn/browser-compat-data/pull/12840#discussion_r752159554
More ideas on these lines, to cut down on the wordiness:
audioCapabilitiesin return value objectaudioCapabilitiesin returned object- Returns object with
audioCapabilities- Returns object with
audioCapabilitiesproperty
Originally posted by @ddbeck in https://github.com/mdn/browser-compat-data/pull/12840#discussion_r760983814
This made me think of the possibility of %parameter%_property_returned as the standard key, if that sounds nice?
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
No files or tests are named. Start by reading issue #12840 and the quoted discussion about returned-object properties, then identify the existing conventions and affected keys; done means the naming convention is settled and its scope is documented.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- json
- Domain
- data
- Issue type
- Refactor
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100