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: no-invalid-regexp support v flag #17404

Merged
merged 5 commits into from Jul 25, 2023

Conversation

ota-meshi
Copy link
Member

@ota-meshi ota-meshi commented Jul 23, 2023

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.0

What changes did you make? (Give an overview)

Refs #17223

This PR modifies the no-invalid-regexp 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 02:26
@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 1a775c4
🔍 Latest deploy log https://app.netlify.com/sites/docs-eslint/deploys/64be875da9f1b50008d358bf

@mdjermanovic mdjermanovic added rule Relates to ESLint's core rules 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 labels Jul 23, 2023
@mdjermanovic
Copy link
Member

@ota-meshi can you also update package.json with "@eslint-community/regexpp": "^4.6.0" in this PR?

@ota-meshi
Copy link
Member Author

I updated regexpp 👍

@mdjermanovic mdjermanovic mentioned this pull request Jul 23, 2023
19 tasks
@ota-meshi
Copy link
Member Author

Thank you for checking this PR! I added test cases.

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" },
Copy link
Member Author

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.

Copy link
Member

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.

Copy link
Member Author

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

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 changes.

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 94954a7 into eslint:main Jul 25, 2023
22 checks passed
@ota-meshi ota-meshi deleted the vavlid-regexp branch July 26, 2023 07:40
@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

3 participants