Skip to main content

no-extra-param-tags

Disallow stale @param tags that do not map to real function parameters.

Targeted pattern scopeโ€‹

This rule checks documented function declarations, methods, and declared functions where parameter names can be resolved safely.

What this rule reportsโ€‹

This rule reports @param tags whose names are not present in the current function signature.

Why this rule existsโ€‹

Refactors often remove or rename parameters without updating docs. Stale @param tags create misleading API docs and confusion for consumers.

โŒ Incorrectโ€‹

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

โœ… Correctโ€‹

/**
* Add two numbers.
* @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โ€‹

The rule intentionally skips ambiguous destructuring signatures where exact name mapping is not always reliable.

ESLint flat config exampleโ€‹

import typedocPlugin from "eslint-plugin-typedoc";

export default [
{
plugins: { typedoc: typedocPlugin },
rules: {
"typedoc/no-extra-param-tags": "error",
},
},
];

When not to use itโ€‹

Disable this rule temporarily during large refactors with intentionally stale docs checkpoints.

Package documentationโ€‹

TypeDoc package documentation:

Further readingโ€‹

Rule catalog ID: R008

Adoption resourcesโ€‹

  • Pair with require-param-tags to enforce both completeness and correctness of parameter docs.