regexp/prefer-quantifier
🔧 This rule is automatically fixable by the --fix
CLI option.
enforce using quantifier
📖 Rule Details
This rule is aimed to use quantifiers instead of consecutive characters in regular expressions.
🔧 Options
json
{
"regexp/prefer-quantifier": ["error", {
"allows": ["www", "\\d\\d"]
}]
}
"allows"
... Array of allowed patterns.
{ "allows": ["www", "\\d\\d"] }
🚀 Version
This rule was introduced in eslint-plugin-regexp v0.2.0