> ## Documentation Index
> Fetch the complete documentation index at: https://loadwise.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# assignment-in-condition

> A condition assigns with = where a comparison was probably meant.

## What it flags

A condition uses `=` where `===` was probably meant, so it overwrites the variable and tests the assigned value. This includes ternary conditions such as `(value = expected) ? first : second`. Doubled parentheses, assignments from calls and loop conditions that read and assign are accepted.

## Configuration

Set the rule to `"off"` in `loadwise.config.json` to drop its findings:

```json theme={null}
{
  "rules": { "assignment-in-condition": "off" }
}
```


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.