disallowAnonymousFunctions

Requires that a function expression be named. Named functions provide more information in the error stack trace than anonymous functions.

This option does not help if you use Arrow functions (ES6) which are always anonymous.

Type: Boolean

Value: true

Example

"disallowAnonymousFunctions": true
Valid
var a = function foo(){

};

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

});
Invalid
var a = function(){

};

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

});
Rule source
Test source