no-cond-assign Disallow assignment in conditions An assignment expression used as a condition tests the assigned value after mutating its target, which can be mistaken for an equality comparison. Instead, you SHOULD move the assignment before the condition or use a binding condition when the assigned value is intentionally tested. - Category: suspicious - Level: warning - Fix: none - Scope: module Reported function select(next: boolean): boolean { let active = false; if ((active = next)) { return active; } return false; } Accepted function select(next: boolean): boolean { let active = next; if (active) { return active; } return false; } Prior art - ESLint ยท no-cond-assign language/linter/src/rules/suspicious/nocondassign.rs:7