@putout/plugin-putout-config 11.2.0 → 11.3.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 +27 -4
- package/lib/apply-spread/index.js +18 -0
- package/lib/index.js +2 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -13,14 +13,15 @@ npm i @putout/plugin-putout-config -D
|
|
|
13
13
|
|
|
14
14
|
## Rules
|
|
15
15
|
|
|
16
|
-
- ✅ [apply-arguments](#apply-
|
|
16
|
+
- ✅ [apply-arguments](#apply-arguments);
|
|
17
17
|
- ✅ [apply-assignment](#apply-assignment);
|
|
18
18
|
- ✅ [apply-conditions](#apply-conditions);
|
|
19
19
|
- ✅ [apply-destructuring](#apply-destructuring);
|
|
20
20
|
- ✅ [apply-esm](#apply-esm);
|
|
21
|
-
- ✅ [apply-return](#apply-return);
|
|
22
|
-
- ✅ [apply-parens](#apply-parens);
|
|
23
21
|
- ✅ [apply-for-of](#apply-for-of);
|
|
22
|
+
- ✅ [apply-parens](#apply-parens);
|
|
23
|
+
- ✅ [apply-return](#apply-return);
|
|
24
|
+
- ✅ [apply-spread](#apply-spread);
|
|
24
25
|
- ✅ [apply-labels](#apply-labels);
|
|
25
26
|
- ✅ [apply-math](#apply-math);
|
|
26
27
|
- ✅ [apply-nodejs](#apply-nodejs);
|
|
@@ -51,10 +52,11 @@ npm i @putout/plugin-putout-config -D
|
|
|
51
52
|
"putout-config/apply-nodejs": "on",
|
|
52
53
|
"putout-config/apply-optional-chaining": "on",
|
|
53
54
|
"putout-config/apply-parens": "on",
|
|
55
|
+
"putout-config/apply-promises": "on",
|
|
54
56
|
"putout-config/apply-return": "on",
|
|
57
|
+
"putout-config/apply-spread": "on",
|
|
55
58
|
"putout-config/apply-tape": "on",
|
|
56
59
|
"putout-config/apply-types": "on",
|
|
57
|
-
"putout-config/apply-promises": "on",
|
|
58
60
|
"putout-config/convert-boolean-to-string": "on",
|
|
59
61
|
"putout-config/move-formatter-up": "on",
|
|
60
62
|
"putout-config/remove-empty": "on",
|
|
@@ -236,6 +238,27 @@ Apply [`optional-chaining`](https://github.com/coderaiser/putout/tree/master/pac
|
|
|
236
238
|
}
|
|
237
239
|
```
|
|
238
240
|
|
|
241
|
+
## apply-spread
|
|
242
|
+
|
|
243
|
+
Apply [`spread`](https://github.com/coderaiser/putout/tree/master/packages/plugin-spread#readme) according to:
|
|
244
|
+
|
|
245
|
+
- 🐊[**Putout v41**](https://github.com/coderaiser/putout/releases/tag/v41.0.0):
|
|
246
|
+
|
|
247
|
+
```diff
|
|
248
|
+
{
|
|
249
|
+
"rules": {
|
|
250
|
+
- "remove-useless-spread": "on",
|
|
251
|
+
- "remove-useless-spread/array": "on",
|
|
252
|
+
- "remove-useless-spread/object": "on",
|
|
253
|
+
- "remove-useless-spread/nested": "on"
|
|
254
|
+
+ "spread": "on",
|
|
255
|
+
+ "spread/remove-useless-array": "on",
|
|
256
|
+
+ "spread/remove-useless-object": "on",
|
|
257
|
+
+ "spread/simplify-nested": "on"
|
|
258
|
+
}
|
|
259
|
+
}
|
|
260
|
+
```
|
|
261
|
+
|
|
239
262
|
## apply-conditions
|
|
240
263
|
|
|
241
264
|
Apply [`conditions`](https://github.com/coderaiser/putout/tree/master/packages/plugin-conditions#readme) according to:
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import {createRenameProperty} from '../rename-property.js';
|
|
2
|
+
|
|
3
|
+
const v41 = [
|
|
4
|
+
['remove-useless-spread', 'spread'],
|
|
5
|
+
['remove-useless-spread/nested', 'spread/simplify-nested'],
|
|
6
|
+
['remove-useless-spread/array', 'spread/remove-useless-array'],
|
|
7
|
+
['remove-useless-spread/object', 'spread/remove-useless-object'],
|
|
8
|
+
];
|
|
9
|
+
|
|
10
|
+
const versions = [
|
|
11
|
+
...v41,
|
|
12
|
+
];
|
|
13
|
+
|
|
14
|
+
export const {
|
|
15
|
+
report,
|
|
16
|
+
fix,
|
|
17
|
+
traverse,
|
|
18
|
+
} = createRenameProperty(versions);
|
package/lib/index.js
CHANGED
|
@@ -11,6 +11,7 @@ import * as applyLabels from './apply-labels/index.js';
|
|
|
11
11
|
import * as applyMath from './apply-math/index.js';
|
|
12
12
|
import * as applyNodejs from './apply-nodejs/index.js';
|
|
13
13
|
import * as applyPromises from './apply-promises/index.js';
|
|
14
|
+
import * as applySpread from './apply-spread/index.js';
|
|
14
15
|
import * as applyTape from './apply-tape/index.js';
|
|
15
16
|
import * as applyTypes from './apply-types/index.js';
|
|
16
17
|
import * as convertBooleanToString from './convert-boolean-to-string/index.js';
|
|
@@ -33,6 +34,7 @@ export const rules = {
|
|
|
33
34
|
'apply-parens': applyParens,
|
|
34
35
|
'apply-promises': applyPromises,
|
|
35
36
|
'apply-return': applyReturn,
|
|
37
|
+
'apply-spread': applySpread,
|
|
36
38
|
'apply-tape': applyTape,
|
|
37
39
|
'apply-types': applyTypes,
|
|
38
40
|
'convert-boolean-to-string': convertBooleanToString,
|
package/package.json
CHANGED