Skip to content

Add regexp/require-unicode-sets-regexp rule #598

New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Merged
merged 6 commits into from
Sep 21, 2023

Conversation

ota-meshi
Copy link
Owner

close #582

@changeset-bot
Copy link

changeset-bot bot commented Sep 12, 2023

🦋 Changeset detected

Latest commit: 3757a92

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
eslint-plugin-regexp Minor

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@ota-meshi ota-meshi marked this pull request as ready for review September 12, 2023 14:17
@RunDevelopment
Copy link
Collaborator

The compatibility check isn't enough, because the v might cause the regex to be parsed differently. E.g. /[a&&b]/u. Of course, edge cases like this are going to be extremely rare, since e.g. [a&&b] doesn't make sense without the v flag.

Fixing this should be relatively easy. We just to verify that no character classes in the u regex contain any double punctuation sequences in their raw source code.

@ota-meshi
Copy link
Owner Author

Thank you for checking this PR. I fixed the problem. Could you please check again?

@RunDevelopment RunDevelopment merged commit 17239ab into master Sep 21, 2023
@RunDevelopment RunDevelopment deleted the require-unicode-sets-regexp branch September 21, 2023 14:46
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add require-unicode-sets-regexp
2 participants