-
-
Notifications
You must be signed in to change notification settings - Fork 169
Closed
Labels
Description
Motivation
There should be only 1 @typedef per comment block.
Current behavior
But there is no rule to limit this, therefore it can lead to invalid jsdoc.
Desired behavior
Add a new rules which limits the number of "main" tags (such as @typedef) that can be used in a single comment block.
This could be autofixed by closing and opening another comment block.
Example:
Change:
/**
* @typedef {object} Test1
* @property {string} prop1
* @typedef {object} Test2
* @property {string} prop2
*/Into:
/**
* @typedef {object} Test1
* @property {string} prop1
*/
/**
* @typedef {object} Test2
* @property {string} prop2
*/