jsdoc/check-param-names
eslint-plugin-jsdoc
import jsdoc from "eslint-plugin-jsdoc";
export default [
{
plugins: { jsdoc },
rules: {
"jsdoc/check-param-names": "error",
},
},
];Checks for dupe @param names, that nested param names have roots, and that parameter names in function declarations match JSDoc param names.
/**
* @param opts The options.
* @param a The a.
*/
function quux (a, {b}) {}/**
* @param bar
* @param foo
*/
function quux (foo, bar) {Examples from the ESLint documentation.
jsdoc/check-param-names
eslint-plugin-jsdoc
import jsdoc from "eslint-plugin-jsdoc";
export default [
{
plugins: { jsdoc },
rules: {
"jsdoc/check-param-names": "error",
},
},
];Oxlint does not have this rule.
Biome does not have this rule.
Reports types deemed invalid (customizable and with defaults, for preventing and/or recommending replacements).
Controls how and whether JSDoc blocks can be expressed as single or multiple line blocks.
Requires a return statement in function body if a @returns tag is specified in JSDoc comment(and reports if multiple @returns tags are present).
Ensures that if a @yields is present that a yield (or yield with a value) is present in the function body (or that if a @next is present that there is a yield with a return value present).
Reports invalid alignment of JSDoc block asterisks.
Requires that all function parameters are documented with a @param tag.