A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://ota-meshi.github.io/eslint-plugin-regexp/rules/no-useless-character-class.html below:

Website Navigation


regexp/no-useless-character-class | eslint-plugin-regexp

regexp/no-useless-character-class

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

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

disallow character class with one character

📖 Rule Details

This rule reports character classes that defines only one character.

Character classes that define only one character have the same effect even if you remove the brackets.

🔧 Options json
{
  "regexp/no-useless-character-class": ["error", {
    "ignores": ["="]
  }]
}

The default value is "=" to prevent conflicts with the no-div-regex rule. Note that if you do not specify "=", there may be conflicts with the no-div-regex rule.

"ignores": ["a"] 🚀 Version

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

🔍 Implementation

RetroSearch 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