Checks for assignments in subexpressions, such as in if ((a=b) > 0) return;.

Configuration

{
    "type": "InnerAssignment",
    "props": {
        "severity": "WARNING",
        "ignoreReturnAssignments": true
    }
}

Has an option to ignore return assignment statements as shown below:

function set_value(value : String) : String { return this.value = value; }

Valid

if (a == b) a = c;
while ((a=b) > 0) b=c;

Invalid

if (a = b) a = c;
switch a=b {
    case 0: return true;
    default: return false;
}