diff --git a/docs/src/rules/no-div-regex.md b/docs/src/rules/no-div-regex.md index ccc7287dcbe..cb30420e700 100644 --- a/docs/src/rules/no-div-regex.md +++ b/docs/src/rules/no-div-regex.md @@ -8,7 +8,7 @@ related_rules: -Require regex literals to escape division operators. +Characters `/=` at the beginning of a regular expression literal can be confused with a division assignment operator. ```js function bar() { return /=foo/; } @@ -16,7 +16,7 @@ function bar() { return /=foo/; } ## Rule Details -This is used to disambiguate the division operator to not confuse users. +This rule forbids equal signs (`=`) after the slash (`/`) at the beginning of a regular expression literal, because the characters `/=` can be confused with a division assignment operator. Examples of **incorrect** code for this rule: