New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.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.0.7 to 1.0.8

6

lib/index.js

@@ -150,2 +150,6 @@ 'use strict';

};
};
};
// expose internals for use in other plugins
module.exports.importTraverseObject = importTraverseObject;
module.exports.handleRemovePath = handleRemovePath;

2

package.json
{
"name": "babel-plugin-danger-remove-unused-import",
"version": "1.0.7",
"version": "1.0.8",
"description": "",

@@ -5,0 +5,0 @@ "main": "index.js",

# babel-plugin-danger-remove-unused-import
To shrink the bundle javascript size :smile:
**Note: remove unused import is dangerous**
**because the imported package may have some side effects!**
## Option
```javascript
{
ignore: ['react']
}
```
## Input
```javascript
import React from 'react'
import Button from 'button'
import _ from 'lodash'
import moment from 'moment'
import {data} from '../some-where'
// ...
const a = {}
a.moment = <Button x={data} />
```
## Output
```diff
import React from 'react'
import Button from 'button'
- import _ from 'lodash'
- import moment from 'moment'
import {data} from '../some-where'
// ...
const a = {}
a.moment = <Button x={data} />
```
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