@putout/plugin-putout-config 11.2.0 → 11.4.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 CHANGED
@@ -13,14 +13,15 @@ npm i @putout/plugin-putout-config -D
13
13
 
14
14
  ## Rules
15
15
 
16
- - ✅ [apply-arguments](#apply-assignment);
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",
@@ -157,16 +159,18 @@ Apply [`arguments`](https://github.com/coderaiser/putout/tree/master/packages/pl
157
159
  ```diff
158
160
  {
159
161
  "rules": {
160
- - "convert-arguments-to-rest": "off",
162
+ - "remove-useless-arguments": "off",
161
163
  - "remove-useless-arguments/arguments": "on",
162
164
  - "remove-useless-arguments/method": "on",
163
165
  - "remove-useless-arguments/unused": "on",
164
166
  - "remove-useless-arguments/json-parse": "on"
165
- + "arguments/apply-rest": "on",
167
+ - "convert-arguments-to-rest": "off"
168
+ + "arguments": "off",
166
169
  + "arguments/remove-useless": "on",
167
170
  + "arguments/remove-useless-from-method": "on",
168
171
  + "arguments/remove-unused": "on",
169
- + "arguments/apply-json-parse": "on"
172
+ + "arguments/apply-json-parse": "on",
173
+ + "arguments/apply-rest": "on"
170
174
  }
171
175
  }
172
176
  ```
@@ -236,6 +240,27 @@ Apply [`optional-chaining`](https://github.com/coderaiser/putout/tree/master/pac
236
240
  }
237
241
  ```
238
242
 
243
+ ## apply-spread
244
+
245
+ Apply [`spread`](https://github.com/coderaiser/putout/tree/master/packages/plugin-spread#readme) according to:
246
+
247
+ - 🐊[**Putout v41**](https://github.com/coderaiser/putout/releases/tag/v41.0.0):
248
+
249
+ ```diff
250
+ {
251
+ "rules": {
252
+ - "remove-useless-spread": "on",
253
+ - "remove-useless-spread/array": "on",
254
+ - "remove-useless-spread/object": "on",
255
+ - "remove-useless-spread/nested": "on"
256
+ + "spread": "on",
257
+ + "spread/remove-useless-array": "on",
258
+ + "spread/remove-useless-object": "on",
259
+ + "spread/simplify-nested": "on"
260
+ }
261
+ }
262
+ ```
263
+
239
264
  ## apply-conditions
240
265
 
241
266
  Apply [`conditions`](https://github.com/coderaiser/putout/tree/master/packages/plugin-conditions#readme) according to:
@@ -1,6 +1,7 @@
1
1
  import {createRenameProperty} from '../rename-property.js';
2
2
 
3
3
  const v41 = [
4
+ ['remove-useless-arguments', 'arguments'],
4
5
  ['remove-useless-arguments/arguments', 'arguments/remove-useless'],
5
6
  ['remove-useless-arguments/method', 'arguments/remove-useless-from-method'],
6
7
  ['remove-useless-arguments/unused', 'arguments/remove-unused'],
@@ -0,0 +1,16 @@
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 = [...v41];
11
+
12
+ export const {
13
+ report,
14
+ fix,
15
+ traverse,
16
+ } = 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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@putout/plugin-putout-config",
3
- "version": "11.2.0",
3
+ "version": "11.4.0",
4
4
  "type": "module",
5
5
  "author": "coderaiser <mnemonic.enemy@gmail.com> (https://github.com/coderaiser)",
6
6
  "description": "🐊Putout plugin helps to maintain putout config",