-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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
Add support for @ignore in the docgen tool #42198
Conversation
…found. This aligns better with how core handles documentation around internal functions.
Size Change: 0 B Total Size: 1.25 MB ℹ️ View Unchanged
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please lean on other review; I don't have strong feelings about this. Not sure we should assume that a standard approach in PHP implies it should translate into JS so I don't think I agree with the premise, but I feel like docgen
is something not worth spending too much time debating about.
Supporting it in docgen
is one thing, but we should maybe raise the conversation in the Make chat when discussing a project-wide convention. People may have opinions there.
You will find occurrences of It would be great though to confirm with core committers that it is the correct usage for the Gutenberg project. |
Totally agree. This PR is not intended to make a statement about how things should be documented but rather to ensure that whatever tag is used ( To that end, I think we need to add |
It looks like |
What?
The current
docgen
tool does not recognize the@ignore
tag. This PR adds that functionality into the tool to allow items to be marked as@ignore
so that they won't be added to the documentation.This is part of a larger effort to improve the Data Modules reference - #42125
Why?
Currently, only items tagged as
@private
are not documented and if the tool also supports@ignore
it will allow us to match how core indicates that an item should not be documented.Testing Instructions
package/docgen
directorytest.js
in the root with the following code:node ./bin/cli.js test.js
and check the generated file to confirm the function is documented@ignore
node ./bin/cli.js test.js
and check the generated file to confirm the function is NOT documented