Skip to content

Commit f5cfa72

Browse files
committed
feature: @putout/plugin-putout-config: apply-destructuring: remove-useless-variables: add
1 parent 0f62275 commit f5cfa72

File tree

4 files changed

+8
-3
lines changed

4 files changed

+8
-3
lines changed

packages/plugin-putout-config/README.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -191,15 +191,17 @@ Apply [`destructuring`](https://github.com/coderaiser/putout/tree/master/package
191191
- "split-call-with-destructuring": "off",
192192
- "merge-destructuring-properties": "off",
193193
- "split-nested-destructuring": "off",
194-
- "remove-useless-arguments/destructuring": "off"
194+
- "remove-useless-arguments/destructuring": "off",
195+
- "remove-useless-variables/destruct": "off"
195196
+ "destructuring": "off",
196197
+ "destructuring/remove-useless-object": "off",
197198
+ "destructuring/apply-array": "off",
198199
+ "destructuring/apply-object": "off",
199200
+ "destructuring/split-call": "off",
200201
+ "destructuring/merge-properties": "off",
201202
+ "destructuring/split-nested": "off",
202-
+ "destructuring/remove-useless-arguments": "off"
203+
+ "destructuring/remove-useless-arguments": "off",
204+
+ "destructuring/remove-useless-variables": "off"
203205
}
204206
}
205207
```

packages/plugin-putout-config/lib/apply-destructuring/fixture/apply-destructuring-fix.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ __putout_processor_json({
77
"destructuring/split-call": "off",
88
"destructuring/merge-properties": "off",
99
"destructuring/split-nested": "off",
10-
"destructuring/remove-useless-arguments": "off"
10+
"destructuring/remove-useless-arguments": "off",
11+
"destructuring/remove-useless-variables": "off"
1112
}
1213
});

packages/plugin-putout-config/lib/apply-destructuring/fixture/apply-destructuring.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,5 +8,6 @@ __putout_processor_json({
88
'merge-destructuring-properties': 'off',
99
'split-nested-destructuring': 'off',
1010
'remove-useless-arguments/destructuring': 'off',
11+
'remove-useless-variables/destruct': 'off',
1112
},
1213
});

packages/plugin-putout-config/lib/apply-destructuring/index.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ const v41 = [
99
['split-call-with-destructuring', 'destructuring/split-call'],
1010
['split-nested-destructuring', 'destructuring/split-nested'],
1111
['remove-useless-arguments/destructuring', 'destructuring/remove-useless-arguments'],
12+
['remove-useless-variables/destruct', 'destructuring/remove-useless-variables'],
1213
];
1314

1415
const versions = [...v41];

0 commit comments

Comments
 (0)