@putout/plugin-putout-config 11.7.0 → 11.9.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 +38 -1
- package/lib/apply-destructuring/index.js +4 -0
- package/lib/apply-variables/index.js +19 -0
- package/lib/index.js +2 -0
- package/package.json +1 -1
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",
|
|
@@ -188,20 +190,28 @@ Apply [`destructuring`](https://github.com/coderaiser/putout/tree/master/package
|
|
|
188
190
|
- "apply-destructuring/falsy": "off",
|
|
189
191
|
- "apply-destructuring/array": "off",
|
|
190
192
|
- "apply-destructuring/object": "off",
|
|
193
|
+
- "apply-destructuring/convert-object-to-array": "off",
|
|
191
194
|
- "split-call-with-destructuring": "off",
|
|
192
195
|
- "merge-destructuring-properties": "off",
|
|
193
196
|
- "split-nested-destructuring": "off",
|
|
194
197
|
- "remove-useless-arguments/destructuring": "off",
|
|
195
|
-
- "remove-useless-variables/destruct": "off"
|
|
198
|
+
- "remove-useless-variables/destruct": "off",
|
|
199
|
+
- "extract-object-properties": "off",
|
|
200
|
+
- "extract-object-properties/equal-deep": "off",
|
|
201
|
+
- "extract-object-properties/not-equal-deep": "off",
|
|
196
202
|
+ "destructuring": "off",
|
|
197
203
|
+ "destructuring/remove-useless-object": "off",
|
|
198
204
|
+ "destructuring/apply-array": "off",
|
|
199
205
|
+ "destructuring/apply-object": "off",
|
|
206
|
+
+ "destructuring/convert-object-to-array": "off",
|
|
200
207
|
+ "destructuring/split-call": "off",
|
|
201
208
|
+ "destructuring/merge-properties": "off",
|
|
202
209
|
+ "destructuring/split-nested": "off",
|
|
203
210
|
+ "destructuring/remove-useless-arguments": "off",
|
|
204
211
|
+ "destructuring/remove-useless-variables": "off"
|
|
212
|
+
+ "destructuring/extract-properties": "off",
|
|
213
|
+
+ "desturucturing/extract-properties-equal-deep": "off",
|
|
214
|
+
+ "destructurigin/extract-properties-not-equal-deep": "off",
|
|
205
215
|
}
|
|
206
216
|
}
|
|
207
217
|
```
|
|
@@ -267,6 +277,33 @@ Apply [`spread`](https://github.com/coderaiser/putout/tree/master/packages/plugi
|
|
|
267
277
|
}
|
|
268
278
|
```
|
|
269
279
|
|
|
280
|
+
## apply-variables
|
|
281
|
+
|
|
282
|
+
Apply [`variables`](https://github.com/coderaiser/putout/tree/master/packages/plugin-variables#readme) according to:
|
|
283
|
+
|
|
284
|
+
- 🐊[**Putout v41**](https://github.com/coderaiser/putout/releases/tag/v41.0.0):
|
|
285
|
+
|
|
286
|
+
```diff
|
|
287
|
+
{
|
|
288
|
+
"rules": {
|
|
289
|
+
- "remove-useless-variables": "off",
|
|
290
|
+
- "remove-useless-variables/remove": "on",
|
|
291
|
+
- "remove-useless-variables/assignment": "on",
|
|
292
|
+
- "remove-useless-arguments/declaration": "on",
|
|
293
|
+
- "remove-useless-arguments/duplicate": "on",
|
|
294
|
+
- "remove-useless-arguments/rename": "on",
|
|
295
|
+
- "remove-unreferenced-variables": "on"
|
|
296
|
+
+ "variables": "off",
|
|
297
|
+
+ "variables/remove-useless": "on",
|
|
298
|
+
+ "variables/remove-useless-assignment": "on",
|
|
299
|
+
+ "variables/remove-useless-declarations": "on",
|
|
300
|
+
+ "variables/remove-useless-duplicates": "on",
|
|
301
|
+
+ "variables/remove-useless-rename": "on",
|
|
302
|
+
+ "variables/remove-unreferenced": "on"
|
|
303
|
+
}
|
|
304
|
+
}
|
|
305
|
+
```
|
|
306
|
+
|
|
270
307
|
## apply-conditions
|
|
271
308
|
|
|
272
309
|
Apply [`conditions`](https://github.com/coderaiser/putout/tree/master/packages/plugin-conditions#readme) according to:
|
|
@@ -5,11 +5,15 @@ const v41 = [
|
|
|
5
5
|
['apply-destructuring/object', 'destructuring/apply-object'],
|
|
6
6
|
['apply-destructuring/array', 'destructuring/apply-array'],
|
|
7
7
|
['apply-destructuring/falsy', 'destructuring/remove-useless-object'],
|
|
8
|
+
['apply-destructuring/convert-object-to-array', 'destructuring/convert-object-to-array'],
|
|
8
9
|
['merge-destructuring-properties', 'destructuring/merge-properties'],
|
|
9
10
|
['split-call-with-destructuring', 'destructuring/split-call'],
|
|
10
11
|
['split-nested-destructuring', 'destructuring/split-nested'],
|
|
11
12
|
['remove-useless-arguments/destructuring', 'destructuring/remove-useless-arguments'],
|
|
12
13
|
['remove-useless-variables/destruct', 'destructuring/remove-useless-variables'],
|
|
14
|
+
['extract-object-properties', 'destructuring/extract-properties'],
|
|
15
|
+
['extract-object-properties/equal-deep', 'destructuring/extract-properties-equal-deep'],
|
|
16
|
+
['extract-object-properties/not-equal-deep', 'destructuring/extract-properties-not-equal-deep'],
|
|
13
17
|
];
|
|
14
18
|
|
|
15
19
|
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