🔧 This rule is automatically fixable by the --fix
CLI option.
📖 Rule Details enforces elements order in character class
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
]
}]
}
"order"
... An array of your preferred order. The default is ["\\s", "\\w", "\\d", "\\p", "*", "\\q", "[]"]
.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