requireParenthesesAroundIIFE

Requires parentheses around immediately invoked function expressions.

Type: Boolean

Value: true

JSHint: immed

Example

"requireParenthesesAroundIIFE": true
Valid
var a = (function(){ return 1; })();
var b = (function(){ return 2; }());
var c = (function(){ return 3; }).call(this, arg1);
var d = (function(){ return 3; }.call(this, arg1));
var e = (function(){ return d; }).apply(this, args);
var f = (function(){ return d; }.apply(this, args));
Invalid
var a = function(){ return 1; }();
var c = function(){ return 3; }.call(this, arg1);
var d = function(){ return d; }.apply(this, args);
Rule source
Test source