ECMAScript Annex B defines legacy regex syntax that browsers must support for web compatibility but is considered ambiguous or deprecated.
This includes octal escapes in patterns, incomplete escape sequences, useless escapes, and unescaped special characters outside of character classes.
Using strict regex syntax ensures better clarity and cross-platform compatibility.
When the u (unicode) or v (unicode sets) flag is present, JavaScript already enforces strict regex parsing, so this rule skips those patterns.
If you are intentionally using legacy regex syntax for compatibility with very old JavaScript environments or specific regex behavior, you may choose to disable this rule.
However, in modern development, using strict regex syntax is recommended.