Skip to content
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

Merged
merged 3 commits into from Jul 25, 2023

Conversation

ota-meshi
Copy link
Member

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 regexp v flag.

Is there anything you'd like reviewers to focus on?

@ota-meshi ota-meshi requested a review from a team as a code owner July 23, 2023 06:00
@eslint-github-bot eslint-github-bot bot added the feature This change adds a new feature to ESLint label Jul 23, 2023
@netlify
Copy link

netlify bot commented Jul 23, 2023

Deploy Preview for docs-eslint canceled.

Name Link
🔨 Latest commit 0f26760
🔍 Latest deploy log https://app.netlify.com/sites/docs-eslint/deploys/64c05b4afc43a40008a52e8b

@mdjermanovic mdjermanovic mentioned this pull request Jul 23, 2023
19 tasks
Copy link
Member

@nzakas nzakas left a 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
Copy link
Member

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?

Copy link
Member Author

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?

@amareshsm amareshsm added accepted There is consensus among the team that this change meets the criteria for inclusion new syntax This issue is related to new syntax that has reached stage 4 contributor pool rule Relates to ESLint's core rules labels Jul 24, 2023
Copy link
Member

@nzakas nzakas left a 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>
Copy link
Member

@mdjermanovic mdjermanovic left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks!

@mdjermanovic mdjermanovic merged commit 2a35f3e into eslint:main Jul 25, 2023
22 checks passed
@ota-meshi ota-meshi deleted the prefer-named-capture-group branch July 26, 2023 00:38
@eslint-github-bot eslint-github-bot bot locked and limited conversation to collaborators Jan 22, 2024
@eslint-github-bot eslint-github-bot bot added the archived due to age This issue has been archived; please open a new issue for any further discussion label Jan 22, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
accepted There is consensus among the team that this change meets the criteria for inclusion archived due to age This issue has been archived; please open a new issue for any further discussion contributor pool feature This change adds a new feature to ESLint new syntax This issue is related to new syntax that has reached stage 4 rule Relates to ESLint's core rules
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants