Open Bug 1857349 Opened 1 year ago Updated 9 days ago

Support custom element JSDoc tags

Categories

(Developer Infrastructure :: Lint and Formatting, task, P3)

Tracking

(Not tracked)

People

(Reporter: mstriemer, Unassigned)

References

Details

When documenting custom elements it's helpful to be able to define the @tagname and any @slots that it creates, among some other tags. These aren't included in JSDoc 3 but are used by custom-elements-manifest to generate documentation from JSDoc (supported JSDoc tags.

Some tags we should likely support:

  • @attribute, @attr
  • @csspart, @part
  • @cssproperty, @cssprop
  • @slot
  • @tagname, @tag

If we only want to support a single version of these I'd opt for the long form, which are all first in each bullet of that list.

It looks like we should be able to update the config for valid-jsdoc.js to include something like:

module.exports = {
  plugins: ["jsdoc"],
  rules: {...},
  settings: {
    jsdoc: {
      definedTags: ["attribute", "csspart", "cssproperty", "slot", "tagname"],
    },
  },
};

I don't see an issue with supporting more tags. I do think it would be better to support just one form, so that we have consistency over the code base, and the longer form seem better for that.

Severity: -- → N/A
Priority: -- → P3

(In reply to Mark Banner (:standard8) from comment #1)

I don't see an issue with supporting more tags. I do think it would be better to support just one form, so that we have consistency over the code base, and the longer form seem better for that.

No issue here. I have a slight preference towards the shorter forms as they seem clear enough and quicker to type and take up less room in our restricted line length but I'm happy with either so long as we standardise.

See Also: → 1948309
You need to log in before you can comment on or make changes to this bug.