11.0.0 β€’ Published 12 months ago

@putout/plugin-merge-duplicate-imports v11.0.0

Weekly downloads
2,543
License
MIT
Repository
github
Last release
12 months ago

@putout/plugin-merge-duplicate-imports NPM version

The static import statement is used to import read only live bindings which are exported by another module.

(c) MDN

🐊Putout plugin adds ability to find and merge duplicate imports.

Install

npm i @putout/plugin-merge-duplicate-imports
{
    "rules": {
        "merge-duplicate-imports/join": "on",
        "merge-duplicate-imports/rename": "on"
    }
}

join

❌ Example of incorrect code

import test from 'supertape';
import {stub} from 'supertape';

βœ… Example of correct code

import test, {stub} from 'supertape';

rename

Checkout in 🐊Putout Editor.

❌ Example of incorrect code

import putout from './putout.js';
import all from './putout.js';
import x from './putout.js';

console.log(all);
console.log(x);

βœ… Example of correct code

import putout from './putout.js';

console.log(putout);
console.log(putout);

License

MIT

11.0.0

12 months ago

10.0.0

1 year ago

9.0.0

2 years ago

8.0.0

2 years ago

7.0.0

2 years ago

6.1.0

3 years ago

6.0.0

3 years ago

5.0.0

3 years ago

4.0.1

3 years ago

4.0.0

3 years ago

3.2.1

3 years ago

3.2.0

3 years ago

3.1.0

4 years ago

3.0.0

4 years ago

2.0.1

4 years ago

2.0.0

4 years ago

1.2.0

5 years ago

1.1.0

5 years ago

1.0.0

5 years ago