npm

Need private packages and team management tools?Check out npm Orgs. »

babel-plugin-danger-remove-unused-import

2.0.0 • Public • Published

babel-plugin-danger-remove-unused-import

Build status Test coverage NPM version NPM Downloads Prettier Conventional Commits

For shrinking the bundled javascript size 😄

Note: remove unused import is dangerous
because the imported package may have some side effects!

Option

{
  ignore: ['react']
}

Input

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

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

  • Supporting Scope

install

npm i babel-plugin-danger-remove-unused-import

Downloadsweekly downloads

1,442

version

2.0.0

license

MIT

homepage

github.com

repository

Gitgithub

last publish

collaborators

  • avatar
Report a vulnerability