sonarjs/no-empty-character-class
eslint-plugin-sonarjs
No autofixRecommended
eslint.config.js
export default [
{
rules: {
"sonarjs/no-empty-character-class": "error",
},
},
];Empty character classes should not be used
No code example for this rule
The linters' documentation does not include one we could extract.
sonarjs/no-empty-character-class
eslint-plugin-sonarjs
export default [
{
rules: {
"sonarjs/no-empty-character-class": "error",
},
},
];Oxlint does not have this rule.
Biome does not have this rule.
Disallow empty character classes in regular expressions
Alternation in regular expressions should not contain empty alternatives
Empty collections should not be accessed or iterated
Reluctant quantifiers in regular expressions should be followed by an expression that can't match the empty string
Regular expressions should not contain empty groups
Collection elements should not be replaced unconditionally