Skip to content

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

src/users.ts · focus
/** Get the user by id. */
export function getUserById(id: string) { return id; }

After

Document behavior absent from the signature

src/users.ts · focus
/** 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

deleteBlockrestatesSignature

Formerly: jsdoc-restates-signature