7 Comparing to `null` without a type-checking operator (`==` or `!=`), can have unintended results as the comparison will evaluate to true when comparing to not just a `null`, but also an `undefined` value.
17 The `no-eq-null` rule aims reduce potential bug and unwanted behavior by ensuring that comparisons to `null` only match `null`, and not also `undefined`. As such it will flag comparisons to null when using `==` and `!=`.
19 Examples of **incorrect** code for this rule:
24 /*eslint no-eq-null: "error"*/
37 Examples of **correct** code for this rule:
42 /*eslint no-eq-null: "error"*/
48 while (qux !== null) {
57 If you want to enforce type-checking operations in general, use the more powerful [eqeqeq](./eqeqeq) instead.
61 * **JSHint**: This rule corresponds to `eqnull` rule of JSHint.