-
Notifications
You must be signed in to change notification settings - Fork 4.9k
Testing: Add rule to enforce existence of JSDoc #15193
Copy link
Copy link
Closed as not planned
Labels
[Tool] Docgen/packages/docgen/packages/docgen[Type] Automated TestingTesting infrastructure changes impacting the execution of end-to-end (E2E) and/or unit tests.Testing infrastructure changes impacting the execution of end-to-end (E2E) and/or unit tests.[Type] TaskIssues or PRs that have been broken down into an individual action to takeIssues or PRs that have been broken down into an individual action to take
Description
Activity
Metadata
Metadata
Assignees
Labels
[Tool] Docgen/packages/docgen/packages/docgen[Type] Automated TestingTesting infrastructure changes impacting the execution of end-to-end (E2E) and/or unit tests.Testing infrastructure changes impacting the execution of end-to-end (E2E) and/or unit tests.[Type] TaskIssues or PRs that have been broken down into an individual action to takeIssues or PRs that have been broken down into an individual action to take
Previously: #6341, #4506, #4245
To the extent reasonable, we should enforce that all functions and top-level symbols of a file have preceding JSDoc. The goal here is in making helping to make clear the purpose of a function, both to the original author and to future maintainers.
Implementation Notes:
require-jsdoc.@wordpress/element(React) component API, as the documentation would not be very useful for methods likerendereslint-plugin-require-jsdoc-exceptallows for exceptions by namerequire-jsdoc, so may be subject to future deprecation removaleslint-plugin-require-jsdoc-excepteslint-disable-next-lineinline adjacent to each violation (automation may help), with a "Disable reason" clarifying that there is no legitimate reason for it to be disabled, and that it should be corrected at the earliest opportunity.