Requires function names to match member and property names.
It doesn't affect anonymous functions nor functions assigned to members or
properties named with a reserved word. Assigning to module.exports
is also
ignored, unless includeModuleExports: true
is configured.
Types: Boolean
or Object
Values: true
or Object with includeModuleExports: true
"requireMatchingFunctionName": true
var test = {};
test.foo = function foo() {};
var test = {};
test['foo'] = function foo() {};
var test = {foo: function foo() {}};
module.exports = function foo() {};
module['exports'] = function foo() {};
var test = {};
test.foo = function bar() {};
var test = {};
test['foo'] = function bar() {};
var test = {foo: function bar() {}};
var test = {module: {}};
test.module.exports = function foo() {};
"requireMatchingFunctionName": { "includeModuleExports": true }
module.exports = function foo() {};
module['exports'] = function foo() {};