eslint/require-yield Correctness ​
What it does ​
This rule generates warnings for generator functions that do not have the yield keyword.
Why is this bad? ​
Probably a mistake.
Example ​
javascript
function* foo() {
return 10;
}
How to use ​
To enable this rule in the CLI or using the config file, you can use:
bash
oxlint --deny require-yield
json
{
"rules": {
"require-yield": "error"
}
}