Skip to content

Files

Latest commit

 

History

History
18 lines (12 loc) · 302 Bytes

prefer-plus-quantifier.md

File metadata and controls

18 lines (12 loc) · 302 Bytes

Pattern: Use of {1,} instead of + quantifier

Issue: -

Description

This rule is aimed at using + quantifier instead of {1,} in regular expressions.

Examples

/* eslint regexp/prefer-plus-quantifier: "error" */
/* ✓ GOOD */
var foo = /a+/;

/* ✗ BAD */
var foo = /a{1,}/;