babel-plugin-danger-remove-unused-import
Advanced tools
Comparing version 1.1.0 to 1.1.1
@@ -0,1 +1,7 @@ | ||
## [1.1.1](https://github.com/imcuttle/babel-plugin-danger-remove-unused-import/compare/v1.1.0...v1.1.1) (2018-11-06) | ||
### Bug Fixes | ||
- computed value in ObjectProperty / class methods ([3ab6e2d](https://github.com/imcuttle/babel-plugin-danger-remove-unused-import/commit/3ab6e2d)) | ||
# [1.1.0](https://github.com/imcuttle/babel-plugin-danger-remove-unused-import/compare/v1.0.13...v1.1.0) (2018-11-05) | ||
@@ -2,0 +8,0 @@ |
@@ -46,3 +46,4 @@ 'use strict'; | ||
var runtimeData = _ref2.runtimeData; | ||
var parentPath = path.parentPath; | ||
var parentPath = path.parentPath, | ||
scope = path.scope; | ||
var name = path.node.name; | ||
@@ -53,3 +54,5 @@ // const ID = 'value'; | ||
// const x = { Tabs: 'value' } | ||
else if (parentPath.isObjectProperty() && parentPath.get('key') === path) {} | ||
else if (parentPath.isObjectProperty() && parentPath.get('key') === path && | ||
// const x = { [Tabs]: 'value' } | ||
!parentPath.node.computed) {} | ||
// { Tabs: 'value' } | ||
@@ -60,3 +63,5 @@ else if (parentPath.isLabeledStatement() && parentPath.get('label') === path) {} | ||
// class A { ID() {} } | ||
else if ((parentPath.isClassProperty() || parentPath.isClassMethod()) && parentPath.get('key') === path) {} else { | ||
else if ((parentPath.isClassProperty() || parentPath.isClassMethod()) && parentPath.get('key') === path && | ||
// class A { [ID]() {} } | ||
!parentPath.node.computed) {} else { | ||
// used | ||
@@ -63,0 +68,0 @@ if (runtimeData[name]) { |
{ | ||
"name": "babel-plugin-danger-remove-unused-import", | ||
"version": "1.1.0", | ||
"version": "1.1.1", | ||
"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
15090
268