--- ruleName: no-conditional-assignment description: Disallows any type of assignment in conditionals. descriptionDetails: 'This applies to `do-while`, `for`, `if`, and `while` statements.' rationale: |- Assignments in conditionals are often typos: for example `if (var1 = var2)` instead of `if (var1 == var2)`. They also can be an indicator of overly clever code which decreases maintainability. optionsDescription: Not configurable. options: null optionExamples: - 'true' type: functionality optionsJSON: 'null' layout: rule title: 'Rule: no-conditional-assignment' ---