badges/shields

Add docstrings for core

Open

#6,038 opened on Jan 8, 2021

View on GitHub
 (8 comments) (0 reactions) (0 assignees)JavaScript (5,423 forks)batch import
documentationgood first issue

Repository metrics

Stars
 (22,337 stars)
PR merge metrics
 (Avg merge 4d 17h) (40 merged PRs in 30d)

Description

:clipboard: Description

Some of the shields internal API is documented with JSDoc strings. For example, https://github.com/badges/shields/blob/master/core/base-service/base-json.js is annotated with comments which can then be compiled into API documentation https://contributing.shields.io/module-core_base-service_base-json-BaseJsonService.html

Ideally it would be great to have full documentation for the core API and service helpers. At this stage, I'm not too concerned about trying do document the individual service implementations - they basically all follow the same pattern so documenting the core framework is really the priority.

Task: Find a class or function under https://github.com/badges/shields/tree/master/core or the root of https://github.com/badges/shields/tree/master/services (not subdirs) without a DocString and add documentation describing the:

  • purpose/behaviour
  • parameter types/descriptions
  • return type

Use npm run build-docs to check the compiled docs and see https://jsdoc.app/ for help with JSDoc syntax.

Contributor guide