Skip to content

regexp/prefer-result-array-groups

🔧 This rule is automatically fixable by the --fix CLI option.

enforce using result array groups

📖 Rule Details

This rule reports and fixes regexp result arrays where named capturing groups are accessed by index instead of using groups.

Now loading...

🔧 Options

json
{
  "regexp/prefer-result-array-groups": ["error", {
    "strictTypes": true
  }]
}
  • strictTypes ... If true, strictly check the type of object to determine if the string instance was used in match() and matchAll(). Default is true.
    This option is always on when using TypeScript.

🚀 Version

This rule was introduced in eslint-plugin-regexp v1.4.0

🔍 Implementation

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy