regexp/no-useless-set-operand
💼 This rule is enabled in the following configs: 🟢 flat/recommended
, 🔵 recommended
.
🔧 This rule is automatically fixable by the --fix
CLI option.
disallow unnecessary elements in expression character classes
📖 Rule Details
The v
flag added set operations for character classes, e.g. [\w&&\D]
and [\w--\d]
, but there are no limitations on what operands can be used. This rule reports any unnecessary operands.
🔧 Options
Nothing.
🚀 Version
This rule was introduced in eslint-plugin-regexp v2.0.0-next.10