Skip to content

Incorrect "fix" for no-useless-spread #3909

@jluxenberg

Description

@jluxenberg

The unicorn/no_useless_spread rule has a bug causing arrays with multiple spread operators to be incorrectly fixed.

# expected result
[...[1,2,3], ...[4,5,6]]  -> [1,2,3,4,5,6]

# actual result
[...[1,2,3], ...[4,5,6]]  -> [1,2,3]

Here's a failing test for these cases:
e1ec854

Tried to fix this but I'm not proficient in Rust. Hopefully someone can take a look. Thanks!

Metadata

Metadata

Assignees

Labels

C-bugCategory - Bug

Type

No type

Priority

None yet

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions