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

lint/control-flow/prefer-bool-return

In the code-quality set. Safe fix.

What it does

Simplify if control structures that return the boolean result of their condition.

Configuration

[lint.rules]
"control-flow/prefer-bool-return" = "error"

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

Replaces

Merged rules

These old IDs are now this rule. A config that still names one stops with an error. See merged rules.

  • lint/control-flow/prefer-returned-condition

More lint/control-flow rules · Edit this page

Last updated on

Was this page helpful?