-
Notifications
You must be signed in to change notification settings - Fork 11
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add support for v flag to regexp/negation
rule
#560
Conversation
🦋 Changeset detectedLatest commit: 27f8c28 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
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 |
12c69e1
to
1cb2a25
Compare
7763de5
to
ed38baf
Compare
Thank you for sharing the link, and making some fixes! |
The fix for the bug has been merged yesterday and will be part of Chrome 118. 118 will only be released starting on Oct 10 though, so it will take some time until we see the fix. But that's fine, we can release the rule. |
lib/rules/negation.ts
Outdated
// since we know that the property doesn't contain strings, | ||
// we can just get the characters of the character class | ||
// without worrying about the strings | ||
const ccSet = toUnicodeSet(ccNode, flags).chars |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would like to get rid of the .chars
here. The reasoning explained in the comment isn't trivial, so I would like to simplify it to the code I suggested.
Unfortunately, we can't compare a UnicodeSet
to a CharSet
right now, but I'm currently working on that. I'm currently working on a patch for refa and RAA which will include some fixes + more ergonomics for UnicodeSet
s. So my suggested code will work then.
// since we know that the property doesn't contain strings, | |
// we can just get the characters of the character class | |
// without worrying about the strings | |
const ccSet = toUnicodeSet(ccNode, flags).chars | |
const ccSet = toUnicodeSet(ccNode, flags) |
related to #545