requireFunctionDeclarations

Requires function declarations by disallowing assignment of functions expressions to variables. Function expressions are allowed in all other contexts, including when passed as function arguments or immediately invoked.

Assignment of function expressions to object members is also permitted, since these can't be declared.

Type: Boolean

Value: true

Example

"requireFunctionDeclarations": true
Valid
function declared() {

};

(function iife() {
    void 0;
})();

var obj = {
    a: function () {}
};

obj.b = function () { };

$('#foo').click(function bar() {

};)
Invalid
var expressed = function() {

};

var expressed = function deeply() {

};
Rule source
Test source