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: prefer-named-capture-group
support v
flag
#17409
feat: prefer-named-capture-group
support v
flag
#17409
Conversation
✅ Deploy Preview for docs-eslint canceled.
|
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.
Overall looks good. Just left one suggestion to clarify a comment. Would like @mdjermanovic to review before merging.
|
||
// ES2024 | ||
"new RegExp('(?<c>[[A--B]])', 'v')", | ||
String.raw`new RegExp('([\\q])', 'v')` // SyntaxError |
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 think what you're saying here is that the regex intentionally has a syntax error? If so, can you expand the comment and explain why that's a useful valid test?
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.
Thank you for reviewing this PR. I added a comment. Could you please check again?
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 comments.
Co-authored-by: Milos Djermanovic <milos.djermanovic@gmail.com>
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)
What changes did you make? (Give an overview)
Refs #17223
This PR modifies the
prefer-named-capture-group
rule and adds support for regexpv
flag.Is there anything you'd like reviewers to focus on?