babel-plugin-danger-remove-unused-import
Advanced tools
Comparing version 1.0.5 to 1.0.6
@@ -32,4 +32,12 @@ 'use strict'; | ||
var idTraverseObject = { | ||
Identifier: function Identifier(path, _ref) { | ||
JSXIdentifier: function JSXIdentifier(path, _ref) { | ||
var runtimeData = _ref.runtimeData; | ||
var name = path.node.name; | ||
if (runtimeData[name]) { | ||
delete runtimeData[name]; | ||
} | ||
}, | ||
Identifier: function Identifier(path, _ref2) { | ||
var runtimeData = _ref2.runtimeData; | ||
var parentPath = path.parentPath; | ||
@@ -110,5 +118,8 @@ var name = path.node.name; | ||
})) { | ||
parent.remove(); | ||
!parent.__removed && parent.remove(); | ||
parent.__removed = true; | ||
} else { | ||
data.path.remove(); | ||
var path = data.path; | ||
!path.__removed && path.remove(); | ||
path.__removed = true; | ||
} | ||
@@ -115,0 +126,0 @@ }); |
{ | ||
"name": "babel-plugin-danger-remove-unused-import", | ||
"version": "1.0.5", | ||
"version": "1.0.6", | ||
"description": "", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
9584
253