File tree Expand file tree Collapse file tree 5 files changed +61
-10
lines changed
Expand file tree Collapse file tree 5 files changed +61
-10
lines changed Original file line number Diff line number Diff line change @@ -1631,32 +1631,32 @@ module.exports.include = [
16311631module .exports .exclude = [
16321632 ' var __a = __b' ,
16331633];
1634- ` ` `
1635-
1636- ### ✅ Example of correct code
16371634
1638- ` ` ` js
1639- module .exports .include = () => [
1635+ export const include = [
16401636 ' cons __a = __b' ,
16411637];
16421638
1643- module . exports . exclude = () => [
1639+ export const exclude = [
16441640 ' var __a = __b' ,
16451641];
1642+ ` ` `
16461643
1644+ ### ✅ Example of correct code
1645+
1646+ ` ` ` js
16471647module .exports .include = () => [
1648- ' cons __a = __b' ,
1648+ ' const __a = __b' ,
16491649];
16501650
16511651module .exports .exclude = () => [
16521652 ' var __a = __b' ,
16531653];
16541654
1655- module . exports . include = () => [
1655+ export const include = () => [
16561656 ' cons __a = __b' ,
16571657];
16581658
1659- module . exports . exclude = () => [
1659+ export const exclude = () => [
16601660 ' var __a = __b' ,
16611661];
16621662` ` `
Original file line number Diff line number Diff line change 1+ export const include = ( ) => [
2+ 'cons __a = __b' ,
3+ ] ;
4+ export const exclude = ( ) => [
5+ 'var __a = __b' ,
6+ ] ;
7+
8+ {
9+ export const include = ( ) => [
10+ 'cons __a = __b' ,
11+ ] ;
12+
13+ export const exclude = ( ) => [
14+ 'var __a = __b' ,
15+ ] ;
16+
17+ }
18+ {
19+ export const include = ( ) => [
20+ 'cons __a = __b' ,
21+ ] ;
22+
23+ export const exclude = ( ) => [
24+ 'var __a = __b' ,
25+ ] ;
26+
27+ }
Original file line number Diff line number Diff line change 1+ export const include = ( ) => 'cons __a = __b' ;
2+ export const exclude = ( ) => 'var __a = __b' ;
3+
4+ {
5+ export const include = 'cons __a = __b' ;
6+ export const exclude = 'var __a = __b' ;
7+ }
8+
9+ {
10+ export const include = [ 'cons __a = __b' ] ;
11+ export const exclude = [ 'var __a = __b' ] ;
12+ }
Original file line number Diff line number Diff line change @@ -6,5 +6,12 @@ export const replace = () => ({
66 'module.exports.include = __array' : 'module.exports.include = () => __array' ,
77 'module.exports.exclude = __array' : 'module.exports.exclude = () => __array' ,
88 'module.exports.include = "__a"' : 'module.exports.include = ["__a"]' ,
9- 'module.exports.exclude = "__a"' : 'module.exports.exclude= ["__a"]' ,
9+ 'module.exports.exclude = "__a"' : 'module.exports.exclude = ["__a"]' ,
10+
11+ 'export const include = () => "__a"' : 'export const include = ["__a"]' ,
12+ 'export const exclude = () => "__a"' : 'export const exclude = ["__a"]' ,
13+ 'export const include = __array' : 'export const include = () => __array' ,
14+ 'export const exclude = __array' : 'export const exclude = () => __array' ,
15+ 'export const include = "__a"' : 'export const include = ["__a"]' ,
16+ 'export const exclude = "__a"' : 'export const exclude = ["__a"]' ,
1017} ) ;
Original file line number Diff line number Diff line change @@ -17,6 +17,11 @@ test('plugin-putout: includer: transform', (t) => {
1717 t . end ( ) ;
1818} ) ;
1919
20+ test ( 'plugin-putout: includer: transform: esm' , ( t ) => {
21+ t . transform ( 'esm' ) ;
22+ t . end ( ) ;
23+ } ) ;
24+
2025test ( 'plugin-putout: includer: transform: not-fn' , ( t ) => {
2126 t . transform ( 'not-fn' ) ;
2227 t . end ( ) ;
You can’t perform that action at this time.
0 commit comments