Skip to content
Esc
↑↓navigate↵open⌘Jpreview
On this page

lint/control-flow/prefer-yield-from

In the code-quality set. Safe fix.

What it does

If the function explicitly returns an array, and has the return type iterable, then yield from must be used instead of return.

Configuration

[lint.rules]
"control-flow/prefer-yield-from" = "error"

To skip it in some files, add an override or a @pun-ignore-file comment.

Replaces

More lint/control-flow rules · Edit this page

Last updated on

Was this page helpful?