jsr icon indicating copy to clipboard operation
jsr copied to clipboard

suggestion: account for "single-symbol modules"

Open iuioiua opened this issue 1 year ago • 1 comments

The Standard Library, I'm sure, along with other packages, has many instances of "single-symbol modules". E.g. @std/assert/assert. An author of a single-symbol module would reasonably have function-level JSDocs, instead of module-level JSDocs, as the Standard Library does. This seems to cause a few issues, which I think should be addressed:

  1. A package score point is deducted because no module docs exist. See https://jsr.io/@std/assert/score.
  2. The module page is empty. See https://jsr.io/@std/[email protected]/doc/assert/~.

I tried addressing these issues with JSDocs in https://github.com/denoland/deno_std/pull/4431, but seems to be the wrong approach.

iuioiua avatar Mar 05 '24 01:03 iuioiua

Let's change this so that modules that export a single symbol that does have documentation can count as having a module level JSDoc. The change should be made in this function: https://github.com/jsr-io/jsr/blob/main/api/src/analysis.rs#L343.

lucacasonato avatar May 01 '25 16:05 lucacasonato