Skip to content
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

(TypeScript) Detect incorrect usages of @type in doc blocks #291

Open
mcmire opened this issue May 25, 2023 · 0 comments
Open

(TypeScript) Detect incorrect usages of @type in doc blocks #291

mcmire opened this issue May 25, 2023 · 0 comments

Comments

@mcmire
Copy link
Contributor

mcmire commented May 25, 2023

JSDoc includes a @type tag, which can be used to assign a type to a variable. However, this is commonly confused with the @typedef tag, which is used to define a type.

In TypeScript, neither of these tags are necessary to document a type or interface; the JSDoc integration in VSCode (or one's editor of choice) is perfectly able to read a doc block placed above such a definition.

It would be great if we could write a lint rule which would verify that @type or @typedef is not present in a doc block for a type or interface and remove it automatically.

@mcmire mcmire changed the title (TypeScript) Detect incorrect usages of @type in TSDoc blocks (TypeScript) Detect incorrect usages of @type in doc blocks May 25, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant