correctness/noStringCaseMismatch
correctness · since 1.0.0
Unsafe autofixRecommended
biome.json
{
"linter": {
"rules": {
"correctness": {
"noStringCaseMismatch": "error"
}
}
}
}Disallow comparison of expressions modifying the string case with non-compliant value.
if (s.toUpperCase() === "Abc") {}while (s.toLowerCase() === "Abc") {}if (s.toUpperCase() === "ABC") {}
while (s.toLowerCase() === "abc") {}
for (;s.toLocaleLowerCase() === "ABC";) {}
while (s.toLocaleUpperCase() === "abc") {}
for (let s = "abc"; s === "abc"; s = s.toUpperCase()) {}Examples from the Biome documentation.
ESLint does not have this rule.
Oxlint does not have this rule.
correctness/noStringCaseMismatch
correctness · since 1.0.0
{
"linter": {
"rules": {
"correctness": {
"noStringCaseMismatch": "error"
}
}
}
}Disallow shorthand properties that override earlier, more specific properties.
It detects possible "wrong" semicolons inside JSX elements.
Disallow comparing values to null in Sass @if conditions.
Disallow passing async functions to Svelte stores.