badges/shields

Add docstrings for core

Open

#6,038 创建于 2021年1月8日

在 GitHub 查看
 (7 评论) (0 反应) (0 负责人)JavaScript (22,337 star) (5,423 fork)batch import
documentationgood first issue

描述

: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.

贡献者指南