mirror of
https://git.proxmox.com/git/pve-eslint
synced 2025-10-04 16:10:05 +00:00

includes a (minimal) working wrapper Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
613 B
613 B
Disallow Regular Expressions That Look Like Division (no-div-regex)
Require regex literals to escape division operators.
function bar() { return /=foo/; }
Rule Details
This is used to disambiguate the division operator to not confuse users.
Examples of incorrect code for this rule:
/*eslint no-div-regex: "error"*/
function bar() { return /=foo/; }
Examples of correct code for this rule:
/*eslint no-div-regex: "error"*/
function bar() { return /[=]foo/; }