Skip to content

Latest commit

 

History

History
47 lines (30 loc) · 1.09 KB

no-non-standard-flag.md

File metadata and controls

47 lines (30 loc) · 1.09 KB
pageClass sidebarDepth title description since
rule-details
0
regexp/no-non-standard-flag
disallow non-standard flags
v0.9.0

regexp/no-non-standard-flag

💼 This rule is enabled in the ✅ plugin:regexp/recommended config.

disallow non-standard flags

📖 Rule Details

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.

/* eslint regexp/no-non-standard-flag: "error" */

/* ✓ GOOD */
var foo = /a*b*c/guy;

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

🔧 Options

Nothing.

🚀 Version

This rule was introduced in eslint-plugin-regexp v0.9.0

🔍 Implementation