badges/shields

Add docstrings for core

Open

#6038 opened on Jan 8, 2021

View on GitHub
 (7 comments) (0 reactions) (0 assignees)JavaScript (22,337 stars) (5,423 forks)batch import
documentationgood first issue

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