Disallow equal signs explicitly at the beginning of regular expressions
🔧 FixableSome problems reported by this rule are automatically fixable by the --fix
command line option
This rule is currently frozen and is not accepting feature requests.
Table of ContentsCharacters /=
at the beginning of a regular expression literal can be confused with a division assignment operator.
Rule Detailsfunction bar() { return /=foo/; }
1
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:
Examples of correct code for this rule:
VersionThis rule was introduced in ESLint v0.1.0.
ResourcesRetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4