# babel-plugin-danger-remove-unused-import

> [![Build status](https://img.shields.io/travis/imcuttle/babel-plugin-danger-remove-unused-import/master.svg?style=flat-square)](https://travis-ci.org/imcuttle/babel-plugin-danger-remove-unused-import) [![Test coverage](https://img.shields.io/codecov/c/git

Latest version **2.0.0** (published 2019-09-09) · MIT license · 0 weekly downloads

## Install

```sh
npm install babel-plugin-danger-remove-unused-import
pnpm add babel-plugin-danger-remove-unused-import
yarn add babel-plugin-danger-remove-unused-import
bun add babel-plugin-danger-remove-unused-import
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 2.0.0 |
| Published | 2019-09-09 |
| First published | 2017-11-29 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 10.2 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 19 |
| Maintainers | moyuyc |
| Keywords | imcuttle, shake, remove-unused, babel-plugin |

## Links

- npm: https://www.npmjs.com/package/babel-plugin-danger-remove-unused-import
- Repository: https://github.com/imcuttle/babel-plugin-danger-remove-unused-import
- Homepage: https://github.com/imcuttle/babel-plugin-danger-remove-unused-import#readme
- Issues: https://github.com/imcuttle/babel-plugin-danger-remove-unused-import/issues
- npm.io page: https://npm.io/package/babel-plugin-danger-remove-unused-import

## Alternatives

- [@openai/codex-sdk](https://npm.io/package/@openai/codex-sdk.md) — 731.4K weekly downloads
- [babel-plugin-transform-react-jsx](https://npm.io/package/babel-plugin-transform-react-jsx.md) — 565.0K weekly downloads
- [babel-helper-remove-or-void](https://npm.io/package/babel-helper-remove-or-void.md) — 508.5K weekly downloads
- [@pnpm/store-controller-types](https://npm.io/package/@pnpm/store-controller-types.md) — 186.9K weekly downloads
- [react-native-signature-canvas](https://npm.io/package/react-native-signature-canvas.md) — 155.6K weekly downloads

## Recent versions

- 2.0.0 (latest) — 2019-09-09
- 1.1.2 — 2019-03-13
- 1.1.1 — 2018-11-06
- 1.1.0 — 2018-11-05
- 1.0.13 — 2018-02-09
- 1.0.12 — 2018-02-08
- 1.0.11 — 2018-02-06
- 1.0.10 — 2018-02-05
- 1.0.9 — 2017-12-21
- 1.0.8 — 2017-12-12
- 1.0.7 — 2017-11-29
- 1.0.6 — 2017-11-29
- 1.0.5 — 2017-11-29
- 1.0.4 — 2017-11-29
- 1.0.3 — 2017-11-29
- … 3 more at https://npm.io/package/babel-plugin-danger-remove-unused-import/versions

## README

# babel-plugin-danger-remove-unused-import

[![Build status](https://img.shields.io/travis/imcuttle/babel-plugin-danger-remove-unused-import/master.svg?style=flat-square)](https://travis-ci.org/imcuttle/babel-plugin-danger-remove-unused-import)
[![Test coverage](https://img.shields.io/codecov/c/github/imcuttle/babel-plugin-danger-remove-unused-import.svg?style=flat-square)](https://codecov.io/github/imcuttle/babel-plugin-danger-remove-unused-import?branch=master)
[![NPM version](https://img.shields.io/npm/v/babel-plugin-danger-remove-unused-import.svg?style=flat-square)](https://www.npmjs.com/package/babel-plugin-danger-remove-unused-import)
[![NPM Downloads](https://img.shields.io/npm/dm/babel-plugin-danger-remove-unused-import.svg?style=flat-square&maxAge=43200)](https://www.npmjs.com/package/babel-plugin-danger-remove-unused-import)
[![Prettier](https://img.shields.io/badge/code_style-prettier-ff69b4.svg?style=flat-square)](https://prettier.io/)
[![Conventional Commits](https://img.shields.io/badge/Conventional%20Commits-1.0.0-yellow.svg?style=flat-square)](https://conventionalcommits.org)

For shrinking the bundled 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} />
```

## Todo

- [x] Supporting Scope

---
_Source: https://npm.io/package/babel-plugin-danger-remove-unused-import · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
