Skip to content

eslint/require-yield Correctness

This rule is turned on by default.

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;
}

References

Released under the MIT License.