Skip to content

Commit 784dfbe

Browse files
khakaalumirlumir
andauthored
docs: Clarify no-eq-null description (#21120)
* docs: Correct operators in no-eq-null documentation * docs: Improve clarity in no-eq-null documentation * docs: correct no-eq-null operators and grammar Co-authored-by: lumir <[email protected]> --------- Co-authored-by: lumir <[email protected]>
1 parent 6b8d2f7 commit 784dfbe

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

‎docs/src/rules/no-eq-null.md‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ related_rules:
66
---
77

88

9-
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.
9+
Comparing to `null` without a type-checking operator (`==` or `!=`) can have unintended results as the comparison will evaluate to `true` when comparing not just to `null`, but also to `undefined`.
1010

1111
```js
1212
if (foo == null) {
@@ -16,7 +16,7 @@ if (foo == null) {
1616

1717
## Rule Details
1818

19-
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+
The `no-eq-null` rule aims to reduce potential bugs 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 `!=`.
2020

2121
Examples of **incorrect** code for this rule:
2222

0 commit comments

Comments
 (0)