Skip to content

Conversation

@RunDevelopment
Copy link
Collaborator

This brings over the clean-regex/no-unnecessary-quantifier rule.


There is some overlap with regexp/no-useless-exactly-quantifier. @ota-meshi, you said that we might want to deprecate this rule and I agree.

However, if we do deprecate regexp/no-useless-exactly-quantifier, then we have to handle the zero-quantifier case (e.g. a{0}) somewhere else. I think it might be a good idea to add a rule specifically for zero-quantifiers, similar to clean-regex/no-zero-quantifier.

@ota-meshi ota-meshi merged commit dbe5556 into master May 6, 2021
@ota-meshi ota-meshi deleted the no-useless-quantifier branch May 6, 2021 06:36
@ota-meshi
Copy link
Owner

Thank you for this PR!
I would like to add the no-zero-quantifier rule and deprecate the regexp/no-useless-exactly-quantifier rule:+1:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants