jsdoc/require-param
eslint-plugin-jsdoc
import jsdoc from "eslint-plugin-jsdoc";
export default [
{
plugins: { jsdoc },
rules: {
"jsdoc/require-param": "error",
},
},
];Requires that all function parameters are documented with a @param tag.
/**
* @param cfg
* @param cfg.num
*/
function quux ({num, ...extra}) {
}/**
* @param cfg
* @param cfg.num
* @param cfg.extra
*/
function quux ({num, ...extra}) {
}/**
* @param foo
*/
function quux (foo) {Examples from the ESLint documentation.
jsdoc/require-param
eslint-plugin-jsdoc
import jsdoc from "eslint-plugin-jsdoc";
export default [
{
plugins: { jsdoc },
rules: {
"jsdoc/require-param": "error",
},
},
];jsdoc/require-param
jsdoc plugin · pedantic
{
"plugins": [
"jsdoc"
],
"rules": {
"jsdoc/require-param": "error"
}
}Biome does not have this rule.
Reports invalid alignment of JSDoc block asterisks.
This rule checks the values for a handful of tags: @version, @since, @license and @author.
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 use of JSDoc tags in non-tag positions (in the default "typescript" mode).
Requires a return statement in function body if a @returns tag is specified in JSDoc comment(and reports if multiple @returns tags are present).