RunDevelopment/eslint-plugin-clean-regex

no-unnecessary-lazy: Improve rule

RunDevelopment opened this issue · 1 comments

Right now, the rule only reports lazy constant quantifiers but it can do a lot more:

If the next character of the lazy quantifier is not a prefix of the lazily quantified element, the lazy modifier can be removed.

Example:

/ab+?c/