New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
string-content
rule: case insensitive matching
#2277
Labels
Comments
fregante
changed the title
string-content case insensitive matching
Feb 10, 2024
string-content
rule: case insensitive matching
I think we could add a {
"unicorn/string-content": [
"error",
{
"patterns": {
"end of day": {
"caseSensitive": false,
"suggest": "😎",
"fix": false
}
}
}
]
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I'd like to be able to match a word case insensitively to be able to catch words that should be abbreviated in my project, eg End of Day -> EOD. I've tried using the
(?i)
regex mode modifier but it breaks the parsing, and using'/End of Day/i'
doesn't work. Whatever the recommended way to do this is, even if it's just'[Ee][Nn][Dd]\\s+[Oo][Ff]\\s+[Dd][Aa][Yy]'
, could it be added to string-content.md?The text was updated successfully, but these errors were encountered: