E0190: missing comparison; '===' does not extend to the right side of '||'
This happens because
if (selection === "agree" || "strongly agree") is
if ((selection === "agree") || "strongly agree"), i.e. “if
selection is ‘agree’, or if ‘strongly agree’ is truthy, then …”. Because the
"strongly agree" is not empty, it is truthy, and the condition is
To fix this error, write the
=== comparison on both sides of
Note: As of quick-lint-js version 2.11.0, this diagnostic treats
a constant. If you declare your own variable named
E0190 might be
incorrectly reported. To work around this issue, rename your variable to
something other than
undefined, such as
Introduced in quick-lint-js version 2.0.0.
Documentation for other errors