@jcoreio/eslint-plugin-implicit-dependencies
Advanced tools
Comparing version 1.0.1 to 1.0.2
{ | ||
"name": "@jcoreio/eslint-plugin-implicit-dependencies", | ||
"version": "1.0.1", | ||
"version": "1.0.2", | ||
"description": "eslint plugin to detect implicit dependencies", | ||
@@ -5,0 +5,0 @@ "repository": { |
@@ -77,3 +77,3 @@ "use strict"; | ||
'CallExpression:exit': function CallExpressionExit(node) { | ||
if (node.callee.type === 'Identifier' && node.callee.name === 'require') { | ||
if (node.callee.type === 'Identifier' && node.callee.name === 'require' && node.arguments.length >= 1 && node.arguments[0].type === 'Literal') { | ||
var name = node.arguments[0].value; | ||
@@ -92,7 +92,9 @@ checkModuleName(name, node); | ||
'ExportNamedDeclaration:exit': function ExportNamedDeclarationExit(node) { | ||
var name = node.source.value; | ||
var _node$source; | ||
var name = (_node$source = node.source) === null || _node$source === void 0 ? void 0 : _node$source.value; | ||
checkModuleName(name, node); | ||
}, | ||
'ExportAllDeclaration:exit': function ExportAllDeclarationExit(node) { | ||
var name = node.source.value; | ||
var _node$source2; | ||
var name = (_node$source2 = node.source) === null || _node$source2 === void 0 ? void 0 : _node$source2.value; | ||
checkModuleName(name, node); | ||
@@ -99,0 +101,0 @@ } |
6594
110