Checks for unfiltered for-in loops.

The use of this construct results in processing not only own properties of an object, but also properties from its prototype. It may be unexpected in some specific cases, e.g. in utility methods which copy or modify all properties, or when Object's prototype may be incorrectly modified. For example, the following code will print 42 and myMethod:

Object.prototype.myMethod = function myMethod() {};
let a = { foo: 42 };
for (let i in a) {
  console.log(a[i]);
}

To fix it, the whole loop may be replaced with using Object.keys() method, or hasOwnProperty() check may be added:

for (let i in a) {
  if (a.hasOwnProperty(i)) {
    console.log(a[i]);
  }
}