microsoft / tsdoc

A doc comment standard for TypeScript
https://tsdoc.org/
MIT License
4.68k stars 131 forks source link

`eslint-plugin-tsdoc`: Check types referenced through `{@link}` and `{@inheritDoc}` #349

Open kraenhansen opened 1 year ago

kraenhansen commented 1 year ago

In its current form, the plugin doesn't supply a rule to check the types referenced from an inline link or inheritDoc tag.

This means that it's harder for maintainers of documentation to notice when these break due to a rename of some referenced type.

I suggest adding a new rule named check-types or valid-types (as a homage to eslint-plugin-jsdoc's rule of the same name) which would check that the type referenced is in scope of the comment.

Note: Enabling this rule, could potentially also mark the types as used and fix https://github.com/microsoft/tsdoc/issues/348 too.

I'd be interested in submitting a PR for this, if this is interesting for the maintainers.