# regexp/prefer-lookaround

prefer lookarounds over capturing group that do not replace

# 📖 Rule Details

This rule reports string replacement using capturing groups that can be replaced with lookaround assertions.

Now loading...

# 🔧 Options

  "regexp/prefer-lookaround": ["error", {
      "strictTypes": true
  • strictTypes ... If true, strictly check the type of object to determine if the regex instance was used in replace() and replaceAll(). Default is true.
    This option is always on when using TypeScript.

# 🚀 Version

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

# 🔍 Implementation

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