jsdoc/multiline-blocks
eslint-plugin-jsdoc
import jsdoc from "eslint-plugin-jsdoc";
export default [
{
plugins: { jsdoc },
rules: {
"jsdoc/multiline-blocks": "error",
},
},
];Controls how and whether JSDoc blocks can be expressed as single or multiple line blocks.
/** Reported up here
* because the rest is multiline
*//** Not reported */Examples from the ESLint documentation.
jsdoc/multiline-blocks
eslint-plugin-jsdoc
import jsdoc from "eslint-plugin-jsdoc";
export default [
{
plugins: { jsdoc },
rules: {
"jsdoc/multiline-blocks": "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).
Requires a return statement in function body if a @returns tag is specified in JSDoc comment(and reports if multiple @returns tags are present).
Checks for dupe @param names, that nested param names have roots, and that parameter names in function declarations match JSDoc param names.
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.