Skip to content

regexp/require-unicode-sets-regexp

🔧 This rule is automatically fixable by the --fix CLI option.

enforce the use of the v flag

📖 Rule Details

This rule reports regular expressions without the v flag.

It will automatically replace the v flag to regular expressions where it is already uses the 'u' flag and statically guaranteed to be safe to do so. In all other cases, the developer has to check that adding the v flag doesn't cause the regex to behave incorrectly.

If you want to automatically add the v flag to legacy regular expressions that don't use the u flag, use them together with the regexp/require-unicode-regexp rule.

Now loading...

🔧 Options

Nothing.

📚 Further reading

🚀 Version

This rule was introduced in eslint-plugin-regexp v2.0.0-next.7

🔍 Implementation