jsdoc/require-yields-description Style
What it does
Requires a description for @yields tags.
Why is this bad?
A @yields tag should explain what the generator yields.
Examples
Examples of incorrect code for this rule:
js
/**
* @yields {string}
*/
function* quux() {
yield "value";
}Examples of correct code for this rule:
js
/**
* @yields {string} The next value.
*/
function* quux() {
yield "value";
}How to use
To enable this rule using the config file or in the CLI, you can use:
json
{
"plugins": ["jsdoc"],
"rules": {
"jsdoc/require-yields-description": "error"
}
}ts
import { defineConfig } from "oxlint";
export default defineConfig({
plugins: ["jsdoc"],
rules: {
"jsdoc/require-yields-description": "error",
},
});bash
oxlint --deny jsdoc/require-yields-description --jsdoc-pluginVersion
This rule was added in vnext.
