Closed silverwind closed 1 week ago
Thanks for the rule suggestion.
However, is it different from the prefer-regex-literals
rule in ESLint core?
https://eslint.org/docs/latest/rules/prefer-regex-literals#disallowredundantwrapping
It is the same as disallowRedundantWrapping
, I wasn't aware of that option. Added it to my config. Thanks for pointing it out.
Motivation Saw this abuse in the wild.
Description Avoid useless
RegExp
constructor around literals.Examples