@putout/plugin-esm 6.6.0 → 7.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +6 -18
- package/lib/merge-duplicate-imports/index.js +2 -2
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -251,34 +251,22 @@ import ss from '../../bb/ss.js';
|
|
|
251
251
|
const c = 5;
|
|
252
252
|
```
|
|
253
253
|
|
|
254
|
-
### merge-duplicate-imports
|
|
254
|
+
### merge-duplicate-imports/join
|
|
255
255
|
|
|
256
|
-
####
|
|
257
|
-
|
|
258
|
-
To disable use:
|
|
259
|
-
|
|
260
|
-
```json
|
|
261
|
-
{
|
|
262
|
-
"rules": {
|
|
263
|
-
"esm/merge-duplicate-imports-join": "off"
|
|
264
|
-
}
|
|
265
|
-
}
|
|
266
|
-
```
|
|
267
|
-
|
|
268
|
-
##### ❌ Example of incorrect code
|
|
256
|
+
#### ❌ Example of incorrect code
|
|
269
257
|
|
|
270
258
|
```js
|
|
271
259
|
import test from 'supertape';
|
|
272
260
|
import {stub} from 'supertape';
|
|
273
261
|
```
|
|
274
262
|
|
|
275
|
-
|
|
263
|
+
#### ✅ Example of correct code
|
|
276
264
|
|
|
277
265
|
```js
|
|
278
266
|
import test, {stub} from 'supertape';
|
|
279
267
|
```
|
|
280
268
|
|
|
281
|
-
|
|
269
|
+
### merge-duplicate-imports/rename
|
|
282
270
|
|
|
283
271
|
Checkout in 🐊[**Putout Editor**](https://putout.cloudcmd.io/#/gist/6604936dec6b1eed8ce0d143f2962f15/17b310a6e4d85b0b8615a8b91d0e27414e8af291).
|
|
284
272
|
To disable use:
|
|
@@ -291,7 +279,7 @@ To disable use:
|
|
|
291
279
|
}
|
|
292
280
|
```
|
|
293
281
|
|
|
294
|
-
|
|
282
|
+
#### ❌ Example of incorrect code
|
|
295
283
|
|
|
296
284
|
```js
|
|
297
285
|
import putout from './putout.js';
|
|
@@ -302,7 +290,7 @@ console.log(all);
|
|
|
302
290
|
console.log(x);
|
|
303
291
|
```
|
|
304
292
|
|
|
305
|
-
|
|
293
|
+
#### ✅ Example of correct code
|
|
306
294
|
|
|
307
295
|
```js
|
|
308
296
|
import putout from './putout.js';
|
|
@@ -2,6 +2,6 @@ import * as mergeDuplicateImportsJoin from './join/index.js';
|
|
|
2
2
|
import * as mergeDuplicateImportsRename from './rename/index.js';
|
|
3
3
|
|
|
4
4
|
export const rules = {
|
|
5
|
-
'merge-duplicate-imports
|
|
6
|
-
'merge-duplicate-imports
|
|
5
|
+
'merge-duplicate-imports/join': mergeDuplicateImportsJoin,
|
|
6
|
+
'merge-duplicate-imports/rename': mergeDuplicateImportsRename,
|
|
7
7
|
};
|
package/package.json
CHANGED