If I have an array of objects, and loop through them assigning a value to an attribute for each one, WebStorm warns me:
Values assigned to primitive w
I just had the same issue.
You can also ask WebStorm to disable inspection for the next line, but I decided to use a for of loop instead:
for of
for (person of people) { person.surname = 'Baz'; }
It actually made my code more readable as a result so I was happy.