Skip to content

tools/check_docs.ts only validates error.ts — should cover full public API #3860

@SisyphusZheng

Description

@SisyphusZheng

Problem

tools/check_docs.ts only validates a single file:

await checkDocs([
  import.meta.resolve("../packages/fresh/src/error.ts"),
]);

The checkDocs() function in check_docs_lib.ts is fully capable of checking multiple specifiers — it runs deno doc --lint plus custom assertions on @param, @return, @example tags, etc. But the tool is only pointed at error.ts.

What's missing

The public API surface defined in packages/fresh/src/mod.ts exports:

  • App (class)
  • createDefine (function)
  • csrf, cors, csp, ipFilter (middlewares)
  • staticFiles, trailingSlashes (middlewares)
  • page (handler)
  • HttpError (class) ← only this is checked

None of the other 8+ public symbols have their JSDoc validated by CI.

Suggested Fix

Expand the specifier list to cover all public API entry points, or at minimum the key ones defined in mod.ts. The checkDocs library already supports multiple specifiers with no additional work needed.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions