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

lint/control-flow/no-assign-in-condition

In the lint-essential preset and every stricter one. Report only. Intent: correctness.

What it does

Detects assignments in conditions. They can cause unexpected behavior and make the code harder to read.

Configuration

[lint.rules]
"control-flow/no-assign-in-condition" = "error"

To skip it in some files or lines, add an override or an ignore comment.

Replaces

More lint/control-flow rules · Edit this page

Last updated on

Was this page helpful?