@putout/plugin-putout 25.0.1 → 25.1.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 +9 -9
- package/lib/includer/index.js +8 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1631,32 +1631,32 @@ module.exports.include = [
|
|
|
1631
1631
|
module.exports.exclude = [
|
|
1632
1632
|
'var __a = __b',
|
|
1633
1633
|
];
|
|
1634
|
-
```
|
|
1635
|
-
|
|
1636
|
-
### ✅ Example of correct code
|
|
1637
1634
|
|
|
1638
|
-
|
|
1639
|
-
module.exports.include = () => [
|
|
1635
|
+
export const include = [
|
|
1640
1636
|
'cons __a = __b',
|
|
1641
1637
|
];
|
|
1642
1638
|
|
|
1643
|
-
|
|
1639
|
+
export const exclude = [
|
|
1644
1640
|
'var __a = __b',
|
|
1645
1641
|
];
|
|
1642
|
+
```
|
|
1646
1643
|
|
|
1644
|
+
### ✅ Example of correct code
|
|
1645
|
+
|
|
1646
|
+
```js
|
|
1647
1647
|
module.exports.include = () => [
|
|
1648
|
-
'
|
|
1648
|
+
'const __a = __b',
|
|
1649
1649
|
];
|
|
1650
1650
|
|
|
1651
1651
|
module.exports.exclude = () => [
|
|
1652
1652
|
'var __a = __b',
|
|
1653
1653
|
];
|
|
1654
1654
|
|
|
1655
|
-
|
|
1655
|
+
export const include = () => [
|
|
1656
1656
|
'cons __a = __b',
|
|
1657
1657
|
];
|
|
1658
1658
|
|
|
1659
|
-
|
|
1659
|
+
export const exclude = () => [
|
|
1660
1660
|
'var __a = __b',
|
|
1661
1661
|
];
|
|
1662
1662
|
```
|
package/lib/includer/index.js
CHANGED
|
@@ -6,5 +6,12 @@ export const replace = () => ({
|
|
|
6
6
|
'module.exports.include = __array': 'module.exports.include = () => __array',
|
|
7
7
|
'module.exports.exclude = __array': 'module.exports.exclude = () => __array',
|
|
8
8
|
'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"]',
|
|
10
17
|
});
|
package/package.json
CHANGED