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

Add Support for RegExp match indices #14640

Closed
4 of 5 tasks
ota-meshi opened this issue May 29, 2021 · 5 comments · Fixed by #14653
Closed
4 of 5 tasks

Add Support for RegExp match indices #14640

ota-meshi opened this issue May 29, 2021 · 5 comments · Fixed by #14653

Comments

@ota-meshi
Copy link
Contributor

@ota-meshi ota-meshi commented May 29, 2021

The version of ESLint you are using.

7.27.0

The problem you want to solve.

Support RegExp match indices officially, as it has reached stage-4.
refs:
https://github.com/tc39/proposals/blob/master/finished-proposals.md
https://github.com/tc39/proposal-regexp-match-indices

Your take on the correct solution to problem.

We probably need to add d to the validFlags of the no-invalid-regexp rule.
We probably need to add d to the regex variable of the no-empty-character-class rule.

Are you willing to submit a pull request to implement this change?

I will submit a pull request.

@ota-meshi
Copy link
Contributor Author

@ota-meshi ota-meshi commented May 31, 2021

Since acorn has been released, I would like to specify a new acorn in the espree dependency and make changes to allow 2022 for ecmaVersion. Is this acceptable?

https://github.com/acornjs/acorn/blob/master/acorn/CHANGELOG.md#830-2021-05-31

When I make changes to ecmaVersion to allow 2022, acorn also tries to parse class fileds, but espree doesn't yet support it. Is es2022 syntax support done in v8.0.0?

@mysticatea mysticatea pinned this issue May 31, 2021
@ota-meshi
Copy link
Contributor Author

@ota-meshi ota-meshi commented Jun 1, 2021

I saw the meeting memo. My understanding is that support for the ES2022 syntax will not be added to ESLint v7.
https://github.com/eslint/tsc-meetings/blob/master/notes/2021/2021-05-20.md#espree-class-fields

ota-meshi added a commit to ota-meshi/eslint that referenced this issue Jun 1, 2021
@nzakas nzakas added this to Planned in Public Roadmap via automation Jun 11, 2021
@nzakas nzakas moved this from Planned to In Progress in Public Roadmap Jun 11, 2021
@nzakas nzakas added this to Planned in v8.0.0 Jun 11, 2021
@nzakas
Copy link
Member

@nzakas nzakas commented Jun 11, 2021

Yes, we will be waiting to add ES2022 syntax in ESLint v8.0.0. This PR updates Acorn in Espree: eslint/espree#505

ota-meshi added a commit to ota-meshi/eslint that referenced this issue Jun 12, 2021
@mdjermanovic mdjermanovic moved this from Ready to Implement to Pull Request Opened in Triage Jun 13, 2021
@mdjermanovic mdjermanovic moved this from Planned to Pull Request Opened in v8.0.0 Jun 13, 2021
@aladdin-add
Copy link
Member

@aladdin-add aladdin-add commented Jun 14, 2021

update: regexpp v3.2.0 was released!

@ota-meshi
Copy link
Contributor Author

@ota-meshi ota-meshi commented Jun 14, 2021

Thank you for letting me know!

ota-meshi added a commit to ota-meshi/eslint that referenced this issue Jun 30, 2021
@nzakas nzakas moved this from Pull Request Opened to Ready for Merge in v8.0.0 Jul 1, 2021
@nzakas nzakas closed this in #14653 Aug 5, 2021
Public Roadmap automation moved this from In Progress to Complete Aug 5, 2021
Triage automation moved this from Pull Request Opened to Complete Aug 5, 2021
v8.0.0 automation moved this from Ready for Merge to Done Aug 5, 2021
nzakas added a commit that referenced this issue Aug 5, 2021
* Update: support new regex d flag (fixes #14640)

* Upgrade regexpp

* Update lib/rules/no-invalid-regexp.js

Co-authored-by: Jordan Harband <ljharb@gmail.com>

* Upgrade espree

Co-authored-by: Jordan Harband <ljharb@gmail.com>
Co-authored-by: Nicholas C. Zakas <nicholas@nczconsulting.com>
@nzakas nzakas unpinned this issue Sep 2, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Public Roadmap
  
Complete
Triage
Complete
v8.0.0
  
Done
Linked pull requests

Successfully merging a pull request may close this issue.

3 participants