code-pushup / cli

A CLI to run all kinds of code quality measurements to align your team with company goals
https://code-pushup.dev
MIT License
255 stars 14 forks source link

Use EcmaScript 2023 for `toSorted` #425

Closed Tlacenka closed 1 month ago

Tlacenka commented 10 months ago

As a contributor, I often come across sorting. I want to have toSorted at my disposal to avoid mutability or having to spread my arrays before sorting them.

Acceptance criteria

Acceptance criteria

Implementation details

Any .sort used after .map, .filter, .reduce or Set/Iterator spreading, should not be refactored as the mutating behavior of .sort might be desired for perf benefit

vmasek commented 8 months ago

Will have a look when updating to ES build