no-duplicate-param-tags
Disallow duplicate @param tags for the same parameter name.
Targeted pattern scopeโ
This rule checks TypeDoc comments on function-like declarations and methods.
What this rule reportsโ
This rule reports when the same parameter name appears in multiple @param tags within one comment block.
Why this rule existsโ
Duplicate parameter docs create ambiguity in rendered docs and usually indicate stale or copy-pasted comments.
โ Incorrectโ
/**
* Add two numbers.
* @param left Left value.
* @param left Duplicate doc.
* @param right Right value.
* @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โ
This rule reports duplicates but does not autofix because deciding which duplicate text to keep is semantic.
ESLint flat config exampleโ
import typedocPlugin from "eslint-plugin-typedoc";
export default [
{
plugins: { typedoc: typedocPlugin },
rules: {
"typedoc/no-duplicate-param-tags": "error",
},
},
];
When not to use itโ
Disable only if your docs style intentionally duplicates parameter entries (rare and usually undesirable).
Package documentationโ
TypeDoc package documentation:
Further readingโ
Rule catalog ID: R015
Adoption resourcesโ
- Pair with
no-extra-param-tagsandrequire-param-tagsfor full parameter-doc hygiene.