-
-
Notifications
You must be signed in to change notification settings - Fork 4.6k
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-useless-escape
support v
flag
#17420
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.
LGTM, thanks! Would like @mdjermanovic to review before merging.
When the useless escape is an operand of For example: /* eslint no-useless-escape: "error" */
/[\p{ASCII}--\.]/v; After applying "Replace the /* eslint no-useless-escape: "error" */
/[\p{ASCII}--\\.]/v; // parsing error
|
Oh... Thank you for finding that issue. I didn't notice that. |
No, it still could be some other kind of mistake in writing the pattern that just happened to manifest as a useless escape, so it seems better to report the problem and let the user choose whether to apply the suggestion to remove |
I got it! Thank you for letting me know your thoughts. I will fix that. |
I fixed that. Could you check it 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, 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
no-useless-escape
rule and adds support for regexpv
flag.Is there anything you'd like reviewers to focus on?