Skip to content

Commit ac6e107

Browse files
committed
feature: @putout/plugin-putout-config: apply-spread: convert-object-assign-to-merge-spread: add
1 parent a59c8a7 commit ac6e107

File tree

4 files changed

+7
-2
lines changed

4 files changed

+7
-2
lines changed

packages/plugin-putout-config/README.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -254,11 +254,13 @@ Apply [`spread`](https://github.com/coderaiser/putout/tree/master/packages/plugi
254254
- "remove-useless-spread/object": "on",
255255
- "remove-useless-spread/nested": "on",
256256
- "convert-apply-to-spread": "on"
257+
- "convert-object-assign-to-merge-spread": "on"
257258
+ "spread": "on",
258259
+ "spread/remove-useless-array": "on",
259260
+ "spread/remove-useless-object": "on",
260261
+ "spread/simplify-nested": "on",
261-
+ "spread/convert-apply-to-spread": "on"
262+
+ "spread/convert-apply-to-spread": "on",
263+
+ "spread/convert-object-assign-to-merge-spread": "on"
262264
}
263265
}
264266
```

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ __putout_processor_json({
44
"spread/simplify-nested": "off",
55
"spread/remove-useless-array": "off",
66
"spread/remove-useless-object": "off",
7-
"spread/convert-apply-to-spread": "off"
7+
"spread/convert-apply-to-spread": "off",
8+
"spread/convert-object-assign-to-merge-spread": "off"
89
}
910
});

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,5 +5,6 @@ __putout_processor_json({
55
"remove-useless-spread/array": "off",
66
"remove-useless-spread/object": "off",
77
"convert-apply-to-spread": "off",
8+
"convert-object-assign-to-merge-spread": "off",
89
}
910
});

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ const v41 = [
66
['remove-useless-spread/array', 'spread/remove-useless-array'],
77
['remove-useless-spread/object', 'spread/remove-useless-object'],
88
['convert-apply-to-spread', 'spread/convert-apply-to-spread'],
9+
['convert-object-assign-to-merge-spread', 'spread/convert-object-assign-to-merge-spread'],
910
];
1011

1112
const versions = [...v41];

0 commit comments

Comments
 (0)