1 # Disallow generator functions that do not have `yield` (require-yield)
5 This rule generates warnings for generator functions that do not have the `yield` keyword.
9 Examples of **incorrect** code for this rule:
12 /*eslint require-yield: "error"*/
20 Examples of **correct** code for this rule:
23 /*eslint require-yield: "error"*/
35 // This rule does not warn on empty generator functions.
41 If you don't want to notify generator functions that have no `yield` expression, then it's safe to disable this rule.
45 * [require-await](require-await.md)