regexp-tree icon indicating copy to clipboard operation
regexp-tree copied to clipboard

Feature request: Make charClassClassrangesMerge do nothing if no ranges could be merged

Open jlherren opened this issue 3 years ago • 0 comments

I'm using eslint-plugin-optimize-regex and I would prefer [-\w] to not be transformed into [\w-]. This seems to be caused by charClassClassrangesMerge, which obviously I could just blacklist. But it would be neat if I didn't have to and this transform would simply do nothing if no ranges were successfully merged. Perhaps the sorting could be added as a separate transform, which I could then blacklist.

I'm using version 0.1.24.

jlherren avatar Nov 10 '21 14:11 jlherren