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
feat: no-invalid-regexp
support v
flag
#17404
Conversation
✅ Deploy Preview for docs-eslint canceled.
|
@ota-meshi can you also update package.json with |
I updated regexpp 👍 |
Thank you for checking this PR! I added test cases. |
tests/lib/rules/no-invalid-regexp.js
Outdated
code: "new RegExp('[[]\\\\u{0}*' /* valid only with `u` flag */, 'v')", | ||
errors: [{ | ||
messageId: "regexMessage", | ||
data: { message: "Invalid regular expression: /[[]\\u{0}*/u: Unterminated character class" }, |
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 noticed that the error message issued by regexpp was wrong. i will fix the error message.
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.
Okay, waiting for the fix then. Otherwise, this LGTM.
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 fixed the error message.
1a775c4
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.
LGTM. Just waiting for @mdjermanovic to verify his changes.
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.
LGTM, thanks!
Prerequisites checklist
What is the purpose of this pull request? (put an "X" next to an item)
[X] Changes an existing rule (template)
[X] Other, please explain:
Update
@eslint-community/regexpp
to v4.6.0What changes did you make? (Give an overview)
Refs #17223
This PR modifies the
no-invalid-regexp
rule and adds support for regexpv
flag.Is there anything you'd like reviewers to focus on?