@putout/plugin-putout 24.1.0 → 24.2.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 +32 -0
- package/lib/apply-exports-to-match-files/index.js +12 -0
- package/lib/index.js +2 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -26,6 +26,7 @@ npm i @putout/plugin-putout -D
|
|
|
26
26
|
- ✅ [apply-create-nested-directory](#apply-create-nested-directory);
|
|
27
27
|
- ✅ [apply-declare](#apply-declare);
|
|
28
28
|
- ✅ [apply-exports-to-add-args](#apply-exports-to-add-args);
|
|
29
|
+
- ✅ [apply-exports-to-match-files](#apply-exports-to-match-files);
|
|
29
30
|
- ✅ [apply-for-of-to-track-file](#apply-for-of-to-track-file);
|
|
30
31
|
- ✅ [apply-fixture-name-to-message](#apply-fixture-name-to-message);
|
|
31
32
|
- ✅ [apply-insert-after](#apply-insert-after);
|
|
@@ -98,6 +99,7 @@ npm i @putout/plugin-putout -D
|
|
|
98
99
|
"putout/apply-async-formatter": "on",
|
|
99
100
|
"putout/apply-declare": "on",
|
|
100
101
|
"putout/apply-exports-to-add-args": "on",
|
|
102
|
+
"putout/apply-exports-to-match-files": "on",
|
|
101
103
|
"putout/apply-report": "on",
|
|
102
104
|
"putout/apply-processors-destructuring": "on",
|
|
103
105
|
"putout/apply-rename": "on",
|
|
@@ -484,6 +486,36 @@ export {
|
|
|
484
486
|
};
|
|
485
487
|
```
|
|
486
488
|
|
|
489
|
+
## apply-exports-to-match-files
|
|
490
|
+
|
|
491
|
+
Check out in 🐊[**Putout Editor**](https://putout.cloudcmd.io/#/gist/d40ac85b974249c51f9874919468fd30/4194c9b21d065bd1359ffc7298aaeb1835fbbb48).
|
|
492
|
+
|
|
493
|
+
### ❌ Example of incorrect code
|
|
494
|
+
|
|
495
|
+
```js
|
|
496
|
+
export default matchFiles({
|
|
497
|
+
'*.cjs': plugin,
|
|
498
|
+
});
|
|
499
|
+
```
|
|
500
|
+
|
|
501
|
+
### ✅ Example of correct code
|
|
502
|
+
|
|
503
|
+
```js
|
|
504
|
+
const {
|
|
505
|
+
report,
|
|
506
|
+
fix,
|
|
507
|
+
scan,
|
|
508
|
+
} = matchFiles({
|
|
509
|
+
'*.cjs': plugin,
|
|
510
|
+
});
|
|
511
|
+
|
|
512
|
+
export {
|
|
513
|
+
report,
|
|
514
|
+
fix,
|
|
515
|
+
scan,
|
|
516
|
+
};
|
|
517
|
+
```
|
|
518
|
+
|
|
487
519
|
## apply-async-formatter
|
|
488
520
|
|
|
489
521
|
### ❌ Example of incorrect code
|
package/lib/index.js
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import * as applyExportsToMatchFiles from './apply-exports-to-match-files/index.js';
|
|
1
2
|
import * as applyProcessorsDestructuring from './apply-processors-destructuring/index.js';
|
|
2
3
|
import * as applyAsyncFormatter from './apply-async-formatter/index.js';
|
|
3
4
|
import * as applyCreateTest from './apply-create-test/index.js';
|
|
@@ -132,4 +133,5 @@ export const rules = {
|
|
|
132
133
|
'apply-lowercase-to-node-builders': applyLowercaseToNodeBuilders,
|
|
133
134
|
'apply-create-nested-directory': applyCreateNestedDirectory,
|
|
134
135
|
'apply-report': applyReport,
|
|
136
|
+
'apply-exports-to-match-files': applyExportsToMatchFiles,
|
|
135
137
|
};
|
package/package.json
CHANGED