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/prefer-range.html below:

Website Navigation


regexp/prefer-range | eslint-plugin-regexp

regexp/prefer-range

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

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

enforce using character class range

📖 Rule Details

This rule is aimed to use ranges instead of multiple adjacent characters in character class.

🔧 Options json5
{
  "regexp/prefer-range": ["error",
    {
      "target": "alphanumeric" // or "all" or [...]
    }
  ]
}

This option can be used to override the allowedCharacterRanges setting.

It allows all values that the allowedCharacterRanges setting allows.

"target": "alphanumeric" "target": "all" "target": [ "alphanumeric", "😀-😏" ] 🚀 Version

This rule was introduced in eslint-plugin-regexp v0.4.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