# regexp/prefer-result-array-groups

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 (opens new window).

Now loading...

# 🔧 Options

{
  "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

Last Updated: 6/25/2022, 12:32:38 PM