Here's the relevant snippet of code from JSHint (modified slightly for formatting):
if (
state.option.forin &&
s &&
(s.length > 1 || typeof s[0] !== "object" || s[0].value !== "if")
) {
warning("W089", this);
}
The important part is s[0].value !== "if"
. JSHint won't raise an error if the first statement of the for...in
body is an if
statement, regardless of the condition of that statement.