regexp-tree
regexp-tree copied to clipboard
Feature request: Make charClassClassrangesMerge do nothing if no ranges could be merged
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.