disallow duplicate characters in the RegExp character class
- ⚙️ This rule is included in
- 🔧 The
--fixoption on the command line (opens new window) can automatically fix some of the problems reported by this rule.
Because multiple same character classes in regular expressions only one is useful, they might be typing mistakes.
var foo = /\\(\\)/;
# 📖 Rule Details
This rule disallows duplicate characters in the RegExp character class.
# 🔧 Options
# 🚀 Version
This rule was introduced in eslint-plugin-regexp v0.1.0