jsdoc/require-yields
eslint-plugin-jsdoc
No autofixRecommended
eslint.config.js
import jsdoc from "eslint-plugin-jsdoc";
export default [
{
plugins: { jsdoc },
rules: {
"jsdoc/require-yields": "error",
},
},
];/**
* Loads the user.
*/
function * load (id: string) {
const user = (yield call(fetchUser, id)) as User;
use(user);
}/**
* @yields Foo.
*/
function * quux () {Examples from the ESLint documentation.
jsdoc/require-yields
eslint-plugin-jsdoc
import jsdoc from "eslint-plugin-jsdoc";
export default [
{
plugins: { jsdoc },
rules: {
"jsdoc/require-yields": "error",
},
},
];jsdoc/require-yields
jsdoc plugin · correctness
{
"plugins": [
"jsdoc"
],
"rules": {
"jsdoc/require-yields": "error"
}
}Biome does not have this rule.
Requires that each @param tag has a description value.
This rule reports defaults being used on the relevant portion of @param or @default.
Prevents use of multiple asterisks at the beginning of lines.
Requires that the @returns tag has a description value (not including void/undefined type returns).
Requires that all @property tags have names.