@@ -27,6 +27,7 @@ npm i @putout/plugin-putout -D
27
27
- ✅ [ apply-declare] ( #apply-declare ) ;
28
28
- ✅ [ apply-exports-to-add-args] ( #apply-exports-to-add-args ) ;
29
29
- ✅ [ apply-exports-to-match-files] ( #apply-exports-to-match-files ) ;
30
+ - ✅ [ apply-exports-to-rename-files] ( #apply-exports-to-rename-files ) ;
30
31
- ✅ [ apply-for-of-to-track-file] ( #apply-for-of-to-track-file ) ;
31
32
- ✅ [ apply-fixture-name-to-message] ( #apply-fixture-name-to-message ) ;
32
33
- ✅ [ apply-insert-after] ( #apply-insert-after ) ;
@@ -100,6 +101,7 @@ npm i @putout/plugin-putout -D
100
101
"putout/apply-declare" : " on" ,
101
102
"putout/apply-exports-to-add-args" : " on" ,
102
103
"putout/apply-exports-to-match-files" : " on" ,
104
+ "putout/apply-exports-to-rename-files" : " on" ,
103
105
"putout/apply-report" : " on" ,
104
106
"putout/apply-processors-destructuring" : " on" ,
105
107
"putout/apply-rename" : " on" ,
@@ -516,6 +518,44 @@ export {
516
518
};
517
519
` ` `
518
520
521
+ ## apply-exports-to-rename-files
522
+
523
+ Check out in 🐊[**Putout Editor**](https://putout.cloudcmd.io/#/gist/999f7a582825fa88691ba87324365f3f/c679723b7ff2159d738ab7681f8c7c6460dd4326).
524
+
525
+ ### ❌ Example of incorrect code
526
+
527
+ ` ` ` js
528
+ export default renameFiles ({
529
+ type: ' module' ,
530
+ mask: ' *.mjs' ,
531
+ rename (name ) {
532
+ return name .replace (/ mjs$ / , ' js' );
533
+ },
534
+ });
535
+ ` ` `
536
+
537
+ ### ✅ Example of correct code
538
+
539
+ ` ` ` js
540
+ const {
541
+ report ,
542
+ fix ,
543
+ scan ,
544
+ } = renameFiles ({
545
+ type: ' module' ,
546
+ mask: ' *.mjs' ,
547
+ rename (name ) {
548
+ return name .replace (/ mjs$ / , ' js' );
549
+ },
550
+ });
551
+
552
+ export {
553
+ report ,
554
+ fix ,
555
+ scan ,
556
+ };
557
+ ` ` `
558
+
519
559
## apply-async-formatter
520
560
521
561
### ❌ Example of incorrect code
0 commit comments