Skip to content

Help: Document only top-level exports #1261

@HaveSpacesuit

Description

@HaveSpacesuit

Is it possible to configure require-jsdoc to only warn when an exported function is re-exported from an index?

I'm using this config:

"jsdoc/require-jsdoc": ["warn", { "publicOnly": true }]

This works close to how I really want. If I'm developing a library, I'm mostly interested in having documentation on functions that are exported from the library using barrel exports. I don't really want to require documentation on functions that are exported inside the package and only imported inside the package.

Not sure if this is even possible for Lint to detect, but I'd be interested to know if this option already exists. (I see there is an "ancestorsOnly" option in the documentation, but to be honest I don't understand it. It doesn't solve my use case.)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions