no-wrap-func: disallow unnecessary parentheses around function expressions

This rule was removed in ESLint v1.0 and replaced by the no-extra-parens rule. The "functions" option in the new rule is equivalent to the removed rule.

Although it’s possible to wrap functions in parentheses, this can be confusing when the code also contains immediately-invoked function expressions (IIFEs) since parentheses are often used to make this distinction. For example:

var foo = (function() {
    // IIFE
}());

var bar = (function() {
    // not an IIFE
});

Rule Details

This rule will raise a warning when it encounters a function expression wrapped in parentheses with no following invoking parentheses.

The following patterns are considered problems:

var a = (function() {/*...*/});

The following patterns are not considered problems:

var a = function() {/*...*/};

(function() {/*...*/})();

Further Reading

Version

This rule was introduced in ESLint 0.0.9 and removed in 1.0.0-rc-1.

Resources