Repository navigation
feat: support TSDoc in the doc checks and stubs - #35
Open
botandbang wants to merge 1 commit into
Open
botandbang wants to merge 1 commit into
botandbang wants to merge 1 commit into
Conversation
This was referenced Nov 8, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This adds TSDoc support to the doc checks and to the stubs that
--fixand the language server write. It doesn't validate TSDoc grammar or read tsdoc.json.Added:
syntaxkey ("jsdoc"by default, or"tsdoc"), registered as its own feature file. With"tsdoc", stubs write@typeParam T -,@param x -and@packageDocumentationin place of@template T,@param xand@file,require-templateasks for@typeParamin its findings, andvalid-linkreads theAin{@link A#b}as a package name and doesn't look it up. With"jsdoc",Ais still a class the file has to declare. The key is in the regenerateddocov.schema.json, the README and--print-config, and the cache stamps by it.tests/fixtures/tsdoc/parser.ts) that passes every doc check aterrorwith"syntax": "tsdoc", plus unit tests and Hegel properties for each change below.Changed:
require-templatecounts@typeParam T - descand@typeParam Tas namingT.empty-tag-descriptionalso checks@typeParam, and ignores the-TSDoc puts between a name and its description, so@param x -has no description. A-with no space after it, as in-1, stays part of the text.{@inheritDoc}or{@inheritDoc Ref}in a block's description or any tag's text now means the item inherits its docs, the same as the@inheritdocblock tag, unless it's escaped or inside a code span. One helper decides this for both coverage and the checks that leave inheriting blocks alone, and the escape and code-span test is shared withvalid-link.summary-sentenceleaves a block that inherits its docs alone. Before this,/** {@inheritDoc Base.m} */was reported as a summary without a period.valid-linkgives no findings for{@link Foo.bar | text},{@link @scope/pkg#Foo},{@link (Foo:constructor)}and{@link Foo.(bar:static)}in either syntax, and none for{@link pkg#Foo.bar}with"syntax": "tsdoc".inheritkey's docs and schema mention the inline form.Removed: