lib/scanner.js
NodeTypes
has 31 functions (exceeds 20 allowed). Consider refactoring. Open
Open
var NodeTypes = {
AssignmentExpression: function (node) {
return [
node.left,
node.right,
Function exports
has 76 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
module.exports = function(source, functionName, done) {
var program;
try {
Function scanNode
has 53 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function scanNode(node, done) {
setImmediate(function () {
if (NodeTypes[node.type] === undefined) {
return done(null, []);
}
Avoid deeply nested control flow statements. Open
Open
for (var i = 0; i < childNode.arguments.length; i++) {
var argument = childNode.arguments[i];
if (argument.type !== 'Literal') {
return done(new Error('Unsupported require argument type: ' + argument.type));
}