Skip to content

Commit 5634542

Browse files
authored
docs: Clarify eqeqeq suggestion behavior (#21256)
* docs: Clarify eqeqeq suggestion behavior Fixes #21254 * docs: Move eqeqeq link to further reading * docs: Add eqeqeq further reading metadata
1 parent 0430280 commit 5634542

2 files changed

Lines changed: 12 additions & 1 deletion

File tree

‎docs/src/_data/further_reading_links.json‎

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -852,5 +852,12 @@
852852
"logo": "https://github.com/fluidicon.png",
853853
"title": "bluebird/docs/docs/warning-explanations.md at master · petkaantonov/bluebird",
854854
"description": ":bird: :zap: Bluebird is a full featured promise library with unmatched performance. - petkaantonov/bluebird"
855+
},
856+
"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Equality_comparisons_and_sameness": {
857+
"domain": "developer.mozilla.org",
858+
"url": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Equality_comparisons_and_sameness",
859+
"logo": "https://developer.mozilla.org/favicon.ico",
860+
"title": "Equality comparisons and sameness - JavaScript | MDN",
861+
"description": "JavaScript provides three different value-comparison operations:"
855862
}
856-
}
863+
}

‎docs/src/rules/eqeqeq.md‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
---
22
title: eqeqeq
33
rule_type: suggestion
4+
further_reading:
5+
- https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Equality_comparisons_and_sameness
46
---
57

68

@@ -38,6 +40,8 @@ if (obj.getStuff() != undefined) { }
3840

3941
The `--fix` option on the command line automatically fixes some problems reported by this rule. A problem is only fixed if one of the operands is a `typeof` expression, or if both operands are literals with the same type.
4042

43+
In other cases a suggestion is offered which can change runtime behavior if the operands have different types.
44+
4145
## Options
4246

4347
### always

0 commit comments

Comments
 (0)