Why is this an issue?

Empty character classes in regular expressions don’t match anything.

This is likely a sign that the regular expression does not work as intended.

Noncompliant code example

/^foo[]/.test("foobar"); // false

Compliant solution

/^foo/.test("foobar"); // true