eslint: DOCSTRING COP #18509
Labels
chore
refactoring, overhead, tests, etc.
Documentation
related to writing, reading, or generating documentation
DX
developer experience (extension authoring, contributing, etc.)
Because docstrings are now the single source of truth for command documentation (along with types), we need to ensure they are high-quality and normative.
This means establishing baselines for the bare minimum expected in a docstring, as well as the way to do it in cases where there are multiple options. Some examples:
@description
), and exceptions (@description
when@summary
is present)@example
tag particularly needs documenting)...and we need a workflow so we can maintain the standard.
ESLint is probably the right way to do this. There are some that work with docstrings and jsdoc-like tags. TypeScript itself will handle any type-related problems, but can't otherwise tell you that you're using a TypeDoc tag wrong.
We can probably find an ESLint plugin to get us at least partway there. Best case is that we can use an off-the-shelf plugin and configure it to our liking. Worst case is from-scratch ESLint plugin. If research yields the worst case, I'd probably just forget about it.
The text was updated successfully, but these errors were encountered: