@putout/plugin-putout-config 11.6.0 → 11.8.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
@@ -29,6 +29,7 @@ npm i @putout/plugin-putout-config -D
29
29
  - ✅ [apply-promises](#apply-promises);
30
30
  - ✅ [apply-tape](#apply-tape);
31
31
  - ✅ [apply-types](#apply-types);
32
+ - ✅ [apply-variables](#apply-variables);
32
33
  - ✅ [convert-boolean-to-string](#convert-boolean-to-string);
33
34
  - ✅ [move-formatter-up](#move-formatter-up);
34
35
  - ✅ [remove-empty](#remove-empty);
@@ -57,6 +58,7 @@ npm i @putout/plugin-putout-config -D
57
58
  "putout-config/apply-spread": "on",
58
59
  "putout-config/apply-tape": "on",
59
60
  "putout-config/apply-types": "on",
61
+ "putout-config/apply-variables": "on",
60
62
  "putout-config/convert-boolean-to-string": "on",
61
63
  "putout-config/move-formatter-up": "on",
62
64
  "putout-config/remove-empty": "on",
@@ -191,7 +193,8 @@ Apply [`destructuring`](https://github.com/coderaiser/putout/tree/master/package
191
193
  - "split-call-with-destructuring": "off",
192
194
  - "merge-destructuring-properties": "off",
193
195
  - "split-nested-destructuring": "off",
194
- - "remove-useless-arguments/destructuring": "off"
196
+ - "remove-useless-arguments/destructuring": "off",
197
+ - "remove-useless-variables/destruct": "off"
195
198
  + "destructuring": "off",
196
199
  + "destructuring/remove-useless-object": "off",
197
200
  + "destructuring/apply-array": "off",
@@ -199,7 +202,8 @@ Apply [`destructuring`](https://github.com/coderaiser/putout/tree/master/package
199
202
  + "destructuring/split-call": "off",
200
203
  + "destructuring/merge-properties": "off",
201
204
  + "destructuring/split-nested": "off",
202
- + "destructuring/remove-useless-arguments": "off"
205
+ + "destructuring/remove-useless-arguments": "off",
206
+ + "destructuring/remove-useless-variables": "off"
203
207
  }
204
208
  }
205
209
  ```
@@ -265,6 +269,33 @@ Apply [`spread`](https://github.com/coderaiser/putout/tree/master/packages/plugi
265
269
  }
266
270
  ```
267
271
 
272
+ ## apply-variables
273
+
274
+ Apply [`variables`](https://github.com/coderaiser/putout/tree/master/packages/plugin-variables#readme) according to:
275
+
276
+ - 🐊[**Putout v41**](https://github.com/coderaiser/putout/releases/tag/v41.0.0):
277
+
278
+ ```diff
279
+ {
280
+ "rules": {
281
+ - "remove-useless-variables": "off",
282
+ - "remove-useless-variables/remove": "on",
283
+ - "remove-useless-variables/assignment": "on",
284
+ - "remove-useless-arguments/declaration": "on",
285
+ - "remove-useless-arguments/duplicate": "on",
286
+ - "remove-useless-arguments/rename": "on",
287
+ - "remove-unreferenced-variables": "on"
288
+ + "variables": "off",
289
+ + "variables/remove-useless": "on",
290
+ + "variables/remove-useless-assignment": "on",
291
+ + "variables/remove-useless-declarations": "on",
292
+ + "variables/remove-useless-duplicates": "on",
293
+ + "variables/remove-useless-rename": "on",
294
+ + "variables/remove-unreferenced": "on"
295
+ }
296
+ }
297
+ ```
298
+
268
299
  ## apply-conditions
269
300
 
270
301
  Apply [`conditions`](https://github.com/coderaiser/putout/tree/master/packages/plugin-conditions#readme) according to:
@@ -9,6 +9,7 @@ const v41 = [
9
9
  ['split-call-with-destructuring', 'destructuring/split-call'],
10
10
  ['split-nested-destructuring', 'destructuring/split-nested'],
11
11
  ['remove-useless-arguments/destructuring', 'destructuring/remove-useless-arguments'],
12
+ ['remove-useless-variables/destruct', 'destructuring/remove-useless-variables'],
12
13
  ];
13
14
 
14
15
  const versions = [...v41];
@@ -0,0 +1,19 @@
1
+ import {createRenameProperty} from '../rename-property.js';
2
+
3
+ const v41 = [
4
+ ['remove-useless-variables', 'variables'],
5
+ ['remove-useless-variables/remove', 'variables/remove-useless'],
6
+ ['remove-useless-variables/assignment', 'variables/remove-useless-assignment'],
7
+ ['remove-useless-variables/rename', 'variables/rename-useless-rename'],
8
+ ['remove-useless-variables/duplicate', 'variables/remove-useless-duplicate'],
9
+ ['remove-useless-variables/declaration', 'variables/remove-useless-declarations'],
10
+ ['remove-unreferenced-variables', 'variables/remove-unreferenced'],
11
+ ];
12
+
13
+ const versions = [...v41];
14
+
15
+ export const {
16
+ report,
17
+ fix,
18
+ traverse,
19
+ } = createRenameProperty(versions);
package/lib/index.js CHANGED
@@ -14,6 +14,7 @@ import * as applyPromises from './apply-promises/index.js';
14
14
  import * as applySpread from './apply-spread/index.js';
15
15
  import * as applyTape from './apply-tape/index.js';
16
16
  import * as applyTypes from './apply-types/index.js';
17
+ import * as applyVariables from './apply-variables/index.js';
17
18
  import * as convertBooleanToString from './convert-boolean-to-string/index.js';
18
19
  import * as renameRules from './rename-rules/index.js';
19
20
  import * as removeEmpty from './remove-empty/index.js';
@@ -37,6 +38,7 @@ export const rules = {
37
38
  'apply-spread': applySpread,
38
39
  'apply-tape': applyTape,
39
40
  'apply-types': applyTypes,
41
+ 'apply-variables': applyVariables,
40
42
  'convert-boolean-to-string': convertBooleanToString,
41
43
  'move-formatter-up': MoveFormatterUp,
42
44
  'rename-rules': renameRules,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@putout/plugin-putout-config",
3
- "version": "11.6.0",
3
+ "version": "11.8.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",