Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/imcuttle/babel-plugin-danger-remove-unused-import
babel-plugin-danger-remove-unused-import
https://github.com/imcuttle/babel-plugin-danger-remove-unused-import
babel remove-unused-import
Last synced: 2 months ago
JSON representation
babel-plugin-danger-remove-unused-import
- Host: GitHub
- URL: https://github.com/imcuttle/babel-plugin-danger-remove-unused-import
- Owner: imcuttle
- License: mit
- Created: 2017-11-29T12:50:51.000Z (about 7 years ago)
- Default Branch: master
- Last Pushed: 2022-12-08T04:36:13.000Z (about 2 years ago)
- Last Synced: 2024-09-23T20:07:01.577Z (3 months ago)
- Topics: babel, remove-unused-import
- Language: JavaScript
- Size: 1.57 MB
- Stars: 19
- Watchers: 2
- Forks: 6
- Open Issues: 17
-
Metadata Files:
- Readme: Readme.md
- Changelog: CHANGELOG.md
- License: License
Awesome Lists containing this project
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 =
```## 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 =
```## Todo
- [x] Supporting Scope