Skip to main content

require-param-tag-description

Require each @param tag to include a human-readable description.

Targeted pattern scopeโ€‹

This rule checks TypeDoc comments attached to function-like declarations and methods.

What this rule reportsโ€‹

This rule reports @param tags that include a parameter name but no description text.

Why this rule existsโ€‹

A parameter list without explanations is not useful API documentation. This rule ensures each documented parameter has actionable prose.

โŒ Incorrectโ€‹

/**
* Add two values.
* @param left
* @param right Right value.
* @returns Sum.
*/
export function add(left: number, right: number): number {
return left + right;
}

โœ… Correctโ€‹

/**
* Add two values.
* @param left - Left value.
* @param right Right value.
* @returns Sum.
*/
export function add(left: number, right: number): number {
return left + right;
}

Behavior and migration notesโ€‹

This rule intentionally does not autofix because generating high-quality prose descriptions is semantic.

ESLint flat config exampleโ€‹

import typedocPlugin from "eslint-plugin-typedoc";

export default [
{
plugins: { typedoc: typedocPlugin },
rules: {
"typedoc/require-param-tag-description": "error",
},
},
];

When not to use itโ€‹

Disable when parameter explanations are intentionally omitted in favor of external docs.

Package documentationโ€‹

TypeDoc package documentation:

Further readingโ€‹

Rule catalog ID: R018

Adoption resourcesโ€‹

  • Use with require-param-tags and no-extra-param-tags for complete parameter-doc hygiene.