Add Support for RegExp match indices
See original GitHub issueThe 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.
- Ecma262 update: tc39/ecma262#1713
- Acorn update: acornjs/acorn#1039
-
regexpp
update: https://github.com/mysticatea/regexpp/pull/22 -
espree
update: https://github.com/eslint/espree/pull/505 -
eslint
update: #14653
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:
- Created 2 years ago
- Reactions:3
- Comments:5 (5 by maintainers)
Top 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 >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
update: regexpp v3.2.0 was released!
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