# regexp/letter-case
enforce into your favorite case
- 🔧 The
--fix
option on the command line (opens new window) can automatically fix some of the problems reported by this rule.
# 📖 Rule Details
This rule is aimed to unify the case of letters.
# 🔧 Options
{
"regexp/letter-case": ["error", {
"caseInsensitive": "lowercase", // or "uppercase" or "ignore"
"unicodeEscape": "lowercase", // or "uppercase" or "ignore"
"hexadecimalEscape": "lowercase", // or "uppercase" or "ignore"
"controlEscape": "uppercase", // or "lowercase" or "ignore"
}]
}
- String options
"lowercase"
... Enforce lowercase letters."uppercase"
... Enforce uppercase letters."ignore"
... Does not force case.
- Properties
caseInsensitive
... Specifies the letter case when thei
flag is present. Default is"lowercase"
.unicodeEscape
... Specifies the letter case when the unicode escapes. Default is"lowercase"
.hexadecimalEscape
... Specifies the letter case when the hexadecimal escapes. Default is"lowercase"
.controlEscape
... Specifies the letter case when the control escapes (e.g.\cX
). Default is"uppercase"
.
# 🚀 Version
This rule was introduced in eslint-plugin-regexp v0.3.0