You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
`Unexpected strict comparison ('${node.operator}') with '${nullishKind}'. In this codebase, we prefer to use loose equality as a general-purpose nullish check when possible.`,
55
-
suggest: [
56
-
{
57
-
desc: `Use loose comparison ('${looseOperator} null') instead, to check both nullish values.`,
58
-
fix: (fixer)=>[
59
-
fixer.replaceText(offendingChild,"null"),
60
-
fixer.replaceText(operatorToken,looseOperator),
61
-
],
62
-
},
63
-
],
64
-
});
65
-
}
66
-
},
67
-
});
42
+
context.report({
43
+
loc: wasLeft
44
+
? {
45
+
end: operatorToken.loc.end,
46
+
start: node.left.loc!.start,
47
+
}
48
+
: {
49
+
end: node.right.loc!.end,
50
+
start: operatorToken.loc.start,
51
+
},
52
+
message:
53
+
`Unexpected strict comparison ('${node.operator}') with '${nullishKind}'. In this codebase, we prefer to use loose equality as a general-purpose nullish check when possible.`,
54
+
suggest: [
55
+
{
56
+
desc: `Use loose comparison ('${looseOperator} null') instead, to check both nullish values.`,
0 commit comments