# regexp/no-legacy-features

disallow legacy RegExp features

  • ⚙️ This rule is included in "plugin:regexp/recommended".

# 📖 Rule Details

This rule disallow legacy RegExp features.

Now loading...

# 🔧 Options

{
  "regexp/no-legacy-features": ["error", {
    "staticProperties": [
      "input", "$_",
      "lastMatch", "$&",
      "lastParen", "$+",
      "leftContext", "$`",
      "rightContext", "$'",
      "$1", "$2", "$3", "$4", "$5", "$6", "$7", "$8", "$9"
    ],
    "prototypeMethods": ["compile"] 
  }]
}
  • staticProperties ... An array of legacy static properties to forbid.
  • prototypeMethods ... An array of legacy prototype methods to forbid.

# 📚 Further reading

# 🚀 Version

This rule was introduced in eslint-plugin-regexp v0.6.0

# 🔍 Implementation

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