# regexp/require-unicode-regexp
enforce the use of the
u
flag
- 🔧 The
--fix
option on the command line (opens new window) can automatically fix some of the problems reported by this rule.
# 📖 Rule Details
This rule reports regular expressions without the u
flag.
It will automatically add the u
flag to regular expression where it is statically guaranteed to be safe to do so. In all other cases, the developer has to check that adding the u
flag doesn't cause the regex to behave incorrectly.
This rule is inspired by the require-unicode-regexp (opens new window) rule. The position of the report is improved over the core rule and arguments of new RegExp()
are also checked.
# 🔧 Options
Nothing.
# 📚 Further reading
# 🚀 Version
This rule was introduced in eslint-plugin-regexp v1.2.0