@putout/plugin-putout 25.0.0 → 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 +12 -12
- package/lib/includer/index.js +8 -1
- package/lib/index.js +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -98,7 +98,7 @@ npm i @putout/plugin-putout -D
|
|
|
98
98
|
"putout/apply-create-nested-directory": "on",
|
|
99
99
|
"putout/apply-async-formatter": "on",
|
|
100
100
|
"putout/apply-declare": "on",
|
|
101
|
-
"putout/apply-exports": "
|
|
101
|
+
"putout/apply-exports": "off",
|
|
102
102
|
"putout/apply-exports-to-add-args": "on",
|
|
103
103
|
"putout/apply-exports-to-match-files": "on",
|
|
104
104
|
"putout/apply-exports-to-rename-files": "on",
|
|
@@ -470,13 +470,13 @@ Possible configuration:
|
|
|
470
470
|
```json
|
|
471
471
|
{
|
|
472
472
|
"rules": {
|
|
473
|
-
"putout/apply-exports": {
|
|
473
|
+
"putout/apply-exports": ["on", {
|
|
474
474
|
"addArgs": [
|
|
475
475
|
"report",
|
|
476
476
|
"fix",
|
|
477
477
|
"scan"
|
|
478
478
|
]
|
|
479
|
-
}
|
|
479
|
+
}]
|
|
480
480
|
}
|
|
481
481
|
}
|
|
482
482
|
```
|
|
@@ -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
|
+
```
|
|
1643
|
+
|
|
1644
|
+
### ✅ Example of correct code
|
|
1646
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/lib/index.js
CHANGED
|
@@ -135,5 +135,5 @@ export const rules = {
|
|
|
135
135
|
'apply-report': applyReport,
|
|
136
136
|
'apply-exports-to-match-files': applyExportsToMatchFiles,
|
|
137
137
|
'apply-exports-to-rename-files': applyExportsToRenameFiles,
|
|
138
|
-
'apply-exports': applyExports,
|
|
138
|
+
'apply-exports': ['off', applyExports],
|
|
139
139
|
};
|
package/package.json
CHANGED