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/sort-character-class-elements.html below:

Website Navigation


regexp/sort-character-class-elements | eslint-plugin-regexp

regexp/sort-character-class-elements

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

enforces elements order in character class

📖 Rule Details

This rule checks elements of character classes are sorted.

🔧 Options json5
{
  "regexp/sort-character-class-elements": ["error", {
    "order": [
      "\\s", // \s or \S
      "\\w", // \w or \W
      "\\d", // \d or \D
      "\\p", // \p{...} or \P{...}
      "*", // Others (A character or range of characters or an element you did not specify.)
      "\\q", // \q{...}
      "[]", // Nesting character class, or character class expression
    ]
  }]
}
🚀 Version

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