question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Add Support for RegExp match indices

See original GitHub issue

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.

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Reactions:3
  • Comments:5 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
aladdin-addcommented, Jun 14, 2021
1reaction
nzakascommented, Jun 11, 2021

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

Read more comments on GitHub >

github_iconTop Results From Across the Web

RegExp match indices - V8 JavaScript engine
RegExp match indices provide `start` and `end` indices of each matched capture group.
Read more >
tc39/proposal-regexp-match-indices: ECMAScript ... - GitHub
ECMAScript RegExp Match Indices provide additional information about the start and end indices of captured substrings relative to the start of the input ......
Read more >
ECMAScript proposal: RegExp match indices - 2ality
The ECMAScript proposal “RegExp match indices” (by Ron Buckton) adds more information to regular expression match objects (as returned by ...
Read more >
how to get support for regexp-match-indices in node.js?
I want to use the new indices property returned by a regexp match. It is described here: https://v8.dev/features/regexp-match-indices.
Read more >
regexp-match-indices - npm
Start using regexp-match-indices in your project by running `npm ... There are 9 other projects in the npm registry using regexp-match-indices.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found