Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Is GLOBAL in the API documentation correct? #4317

Closed
craigtaub opened this issue Jun 7, 2020 · 3 comments
Closed

Is GLOBAL in the API documentation correct? #4317

craigtaub opened this issue Jun 7, 2020 · 3 comments
Labels
area: documentation anything involving docs or mochajs.org type: bug a defect, confirmed by a maintainer

Comments

@craigtaub
Copy link
Contributor

Are globally scoped variables in the api docs correct?

Screenshot 2020-06-07 at 16 33 15

Im not a JSDOC expert, but I would expect any globally scoped method to be available in a suite or test, yet many are not e.g. https://mochajs.org/api/global.html#runWithSuite.

Is there a mistake here? Are a couple missing the @module directive?

@craigtaub craigtaub added unconfirmed-bug area: documentation anything involving docs or mochajs.org labels Jun 7, 2020
@craigtaub craigtaub changed the title GLOBAL in api documentation Is GLOBAL in the API documentation correct? Jun 7, 2020
@boneskull
Copy link
Member

No. there are many issues with the API organization. likely missing @module yes. none of these are always global. in fact we should not document ANY globals in the context of programmatic usage, which is the target for these doca

@boneskull
Copy link
Member

essentially this is all messed up because we never made it the API docs a priority, and aren’t really rigid about it in PRs. there’s probably some way to automate it but I’d rather go full-TS-types-in-docstrings and generate docs that way. these are incompatible with the jsdoc processor.

@craigtaub
Copy link
Contributor Author

craigtaub commented Jun 8, 2020

we never made it the API docs a priority, and aren’t really rigid about it in PRs

In general we are pretty good with fixes/small features etc, but yeah things slip with the larger scale changes.

in fact we should not document ANY globals in the context of programmatic usage, which is the target for these docs

Yep sounds sensible.

I’d rather go full-TS-types-in-docstrings and generate docs that way

Yeah I know there is a separate and wider issues for this.

@craigtaub craigtaub added type: bug a defect, confirmed by a maintainer and removed unconfirmed-bug labels Jun 8, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: documentation anything involving docs or mochajs.org type: bug a defect, confirmed by a maintainer
Projects
None yet
Development

No branches or pull requests

2 participants