Disallow empty character classes in regular expressions
The "extends": "eslint:recommended"
property in a configuration file enables this rule
Because empty character classes in regular expressions do not match anything, they might be typing mistakes.
This rule disallows empty character classes in regular expressions.
Examples of incorrect code for this rule:
Examples of correct code for this rule:
This rule does not report empty character classes in the string argument of calls to the RegExp
constructor.
Example of a false negative when this rule reports correct code:
This rule was introduced in ESLint v0.22.0.
© OpenJS Foundation and other contributors
Licensed under the MIT License.
https://eslint.org/docs/latest/rules/no-empty-character-class