requireNamedUnassignedFunctions

Require unassigned functions to be named inline

Types: Boolean or Object

Values:

  • true
  • Object:
    • allExcept: array of quoted identifiers

Example

"requireNamedUnassignedFunctions": { "allExcept": ["describe", "it"] }
Valid
[].forEach(function x() {});
var y = function() {};
function z() {}
it(function () {});
Invalid
[].forEach(function () {});
before(function () {});
Rule source
Test source