pageClass | sidebarDepth | title | description | since |
---|---|---|---|---|
rule-details |
0 |
regexp/prefer-star-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 {0,}
in regular expressions.
/* eslint regexp/prefer-star-quantifier: "error" */
/* ✓ GOOD */
var foo = /a*/
/* ✗ BAD */
var foo = /a{0,}/;
Nothing.
This rule was introduced in eslint-plugin-regexp v0.1.0