pageClass | sidebarDepth | title | description | since |
---|---|---|---|---|
rule-details |
0 |
regexp/prefer-plus-quantifier |
enforce using `+` quantifier |
v0.1.0 |
💼 This rule is enabled in the ✅ plugin:regexp/recommended
config.
🔧 This rule is automatically fixable by the --fix
CLI option.
enforce using
+
quantifier
This rule is aimed at using +
quantifier instead of {1,}
in regular expressions.
/* eslint regexp/prefer-plus-quantifier: "error" */
/* ✓ GOOD */
var foo = /a+/;
/* ✗ BAD */
var foo = /a{1,}/;
Nothing.
This rule was introduced in eslint-plugin-regexp v0.1.0