From 133fe450a7d8276962b547cd11f93f96965e1c2b Mon Sep 17 00:00:00 2001 From: gfyoung Date: Wed, 14 Jul 2021 05:37:16 +0000 Subject: [PATCH 1/2] Docs: provide more context to no-eq-null * Encourage use of the more powerful eqeqeq rule for linting equality checks. * Indicate this rule is compatible with an analogous rule in JSHint. xref https://github.com/eslint/eslint/pull/179 closes https://github.com/eslint/eslint/issues/14749 --- docs/rules/no-eq-null.md | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/docs/rules/no-eq-null.md b/docs/rules/no-eq-null.md index df8f97a5eba..4f949be40b3 100644 --- a/docs/rules/no-eq-null.md +++ b/docs/rules/no-eq-null.md @@ -39,3 +39,11 @@ while (qux !== null) { baz(); } ``` + +## Compatibility + +* **JSHint**: This rule corresponds to `eqnull` rule of JSHint. + +## When Not To Use It + +If you want to enforce type-checking operations in general, use the more powerful [eqeqeq](./eqeqeq) instead. \ No newline at end of file From a53d975ee10f80e9637b17c5fb27d707ee2b6daf Mon Sep 17 00:00:00 2001 From: gfyoung Date: Wed, 14 Jul 2021 20:56:43 -0700 Subject: [PATCH 2/2] Update docs/rules/no-eq-null.md Co-authored-by: Brandon Mills --- docs/rules/no-eq-null.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/rules/no-eq-null.md b/docs/rules/no-eq-null.md index 4f949be40b3..7b0f5df142a 100644 --- a/docs/rules/no-eq-null.md +++ b/docs/rules/no-eq-null.md @@ -46,4 +46,4 @@ while (qux !== null) { ## When Not To Use It -If you want to enforce type-checking operations in general, use the more powerful [eqeqeq](./eqeqeq) instead. \ No newline at end of file +If you want to enforce type-checking operations in general, use the more powerful [eqeqeq](./eqeqeq) instead.