Do not wrap function literals in parens unless they are to be immediately invoked.

Flags a parenthesized function literal that is not immediately invoked, eg. (function fun(){})

object-prototype-external

Warning

-

Flags calls to methods of Object.prototype that rely on the prototype chain. For example this code should be flagged:

foo.hasOwnProperty("bar")

Example (1) is unsafe, as foo may have a property named hasOwnProperty, or have been constructed via Object.create(null).

As for this:

Object.hasOwnProperty.call(foo,"bar")

Example (2) technically relies on the prototype chain as well: the hasOwnProperty method is defined on Object.prototype, not Object. Object inherits the methods of Object.prototype through its prototype chain. However (2) is unlikely to fail, as sane JavaScript programs will not modify the global objects' prototypes. If we choose to flag (2), it should only be for style.