Skip to content

Files

Latest commit

 

History

History
20 lines (13 loc) · 434 Bytes

no-non-standard-flag.md

File metadata and controls

20 lines (13 loc) · 434 Bytes

Pattern: Use of non-standard flag

Issue: -

Description

This rule reports non-standard flags.

Some JavaScript runtime implementations allow special flags not defined in the ECMAScript standard. These flags are experimental and should not be used in production code.

Examples

/* eslint regexp/no-non-standard-flag: "error" */
/* ✓ GOOD */
var foo = /a*b*c/guy;

/* ✗ BAD */
var foo = RegExp("(?:a|a)*b", "l");