Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

babel-plugin-danger-remove-unused-import

Package Overview
Dependencies
Maintainers
1
Versions
18
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

babel-plugin-danger-remove-unused-import - npm Package Compare versions

Comparing version 1.1.0 to 1.1.1

6

CHANGELOG.md

@@ -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 @@

11

lib/index.js

@@ -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",

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc