11.0.0 β’ Published 10 months ago
@putout/plugin-merge-duplicate-imports v11.0.0
@putout/plugin-merge-duplicate-imports
The static
import
statement is used toimport
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
10 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
4 years ago
1.1.0
4 years ago
1.0.0
4 years ago