6 - no-prototype-builtins
8 - https://javascriptweblog.wordpress.com/2011/01/04/exploring-javascript-for-in-loops/
9 - https://2ality.com/2012/01/objects-as-maps.html
13 Looping over objects with a `for in` loop will include properties that are inherited through the prototype chain. This behavior can lead to unexpected items in your for loop.
21 Note that simply checking `foo.hasOwnProperty(key)` is likely to cause an error in some cases; see [no-prototype-builtins](no-prototype-builtins).
25 This rule is aimed at preventing unexpected behavior that could arise from using a `for in` loop without filtering the results in the loop. As such, it will warn when `for in` loops do not filter their results with an `if` statement.
27 Examples of **incorrect** code for this rule:
32 /*eslint guard-for-in: "error"*/
41 Examples of **correct** code for this rule:
46 /*eslint guard-for-in: "error"*/
49 if (Object.prototype.hasOwnProperty.call(foo, key)) {
55 if ({}.hasOwnProperty.call(foo, key)) {