TypeScript · maintainability
no-restated-jsdoc
eslint:no-restated-jsdoc Flag a JSDoc block whose description and tags only re-spell the signature they document.
- Default
- error
- Fix
- suggestion
- Languages
- typescript
Why
Signature-only JSDoc duplicates type information and drifts without helping callers.
Fix
Delete the block or document behavior, constraints, failures, or context the signature cannot express.
Before / after
Executed by this rule’s unit tests.
Before
Remove JSDoc that only repeats the signature
/** Get the user by id. */
export function getUserById(id: string) { return id; } After
Document behavior absent from the signature
/** Get the user while bypassing the read replica. */
export function getUser(id: string) { return id; } Limits
- Generated files, detached blocks, unknown tags, empty blocks, and JSDoc with information absent from the signature are excluded.
Message IDs
deleteBlockrestatesSignatureFormerly: jsdoc-restates-signature