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
Breaking: support new regex d flag (fixes #14640) #14653
Conversation
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 once espree v8.0.0 is released and package.json
updated.
Thanks for updating regexpp
with the new syntax, and thanks for refactoring no-empty-character-class
in a way that it doesn't have to be updated with new flags in the future.
Co-authored-by: Jordan Harband <ljharb@gmail.com>
It seems that some existing rule tests fail due to upgrading espree to v8.x. |
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!
WIP
Remaining steps:
espree
.regexpp
.package.json
with the new versions ofespree
.package.json
with the new versions ofregexpp
.Fixes #14640.
Prerequisites checklist
What is the purpose of this pull request? (put an "X" next to an item)
[ ] Documentation update
[ ] Bug fix (template)
[ ] New rule (template)
[x] Changes an existing rule (template)
[ ] Add autofixing to a rule
[ ] Add a CLI option
[ ] Add something to the core
[x] Other, please explain: Upgrade the
espree
and theregexpp
.What changes did you make? (Give an overview)
This PR adds support for ES2022 RegExp Match Indices. Specifically, change the
no-empty-character-class
rule andno-invalid-regexp
rule to allow the regexd
flag.https://github.com/tc39/proposal-regexp-match-indices
Is there anything you'd like reviewers to focus on?
I changed the
no-empty-character-class
rule to accept any flags.