Information:
- ESLint version: 9.32.0
eslint-plugin-regexp version: 2.9.0
Description
regexp/sort-character-class-elements autofix might end up sorting the elements of the character class in a way that completely changes the meaning of the class, for example [~^*] is transformed to [^*~], but ^ at the beginning of the class inverts it. Note that /[*^~]/ is not reported by this rule, which I think what the autofix should turn the input into.
Reproduction: https://stackblitz.com/edit/vitejs-vite-vfsaxys1
Open test.js, run npx eslint --fix, then observe the changes in this file.