Skip to content

regexp/no-dupe-characters-character-class

💼 This rule is enabled in the following configs: 🟢 flat/recommended, 🔵 recommended.

🔧 This rule is automatically fixable by the --fix CLI option.

disallow duplicate characters in the RegExp character class

Because multiple same character classes in regular expressions only one is useful, they might be typing mistakes.

📖 Rule Details

This rule disallows duplicate characters in the RegExp character class.

🔧 Options

Nothing.

🚀 Version

This rule was introduced in eslint-plugin-regexp v0.1.0

🔍 Implementation