mdn / mdn/browser-compat-data

Update data guideline: Parameters and parameter object features

Open Beginner friendly
#29,856 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

docs:guidelines
Dominant language
JSON
Stars
5.8k
Forks
2.6k
Avg merge
1d 21h
Merged PRs (30d)
186

Description

This data guideline needs to be updated: https://github.com/mdn/browser-compat-data/blob/main/docs/data-guidelines/README.md#parameters-and-parameter-object-features

See the discussion in https://github.com/mdn/browser-compat-data/pull/29739#issuecomment-4627771274 as well as https://github.com/mdn/browser-compat-data/pull/29451 which used a nested structure.

In today's BCD call, we agreed that nesting structures are better.

  • Better validation/linting is in place if features are properly nested.
  • MDN rendering for deeply nested features is AFAIK not a problem anymore.

So the guidelines should reflect that and present how to nest parameters keys correctly. It will probably look like this:

  • someMethod
    • options_parameter
      • propA
      • propB
      • propC_options_parameter (we don't need the longer names)

We should be using names from the specification (there are different names for the object parameters like "option", "init", "configuration")

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with docs/data-guidelines/README.md at the “Parameters and parameter object features” section. Read the linked discussion and pull request to understand the agreed nested structure and use specification names for parameter objects. Done means the guideline clearly documents the nested parameter-key pattern and no longer recommends the older structure.

Written by the indexing model from the issue text.

Assessment

Domain
documentation
Issue type
Documentation
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
68/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.