From 47c7be2811842fc6648d03015236a7841e28573b Mon Sep 17 00:00:00 2001 From: Cparros Date: Fri, 11 Nov 2022 14:59:22 -0700 Subject: [PATCH] chore(website): [prefer-nullish-coalescing] explicit notice for strictNullChecks --- .../eslint-plugin/docs/rules/prefer-nullish-coalescing.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/packages/eslint-plugin/docs/rules/prefer-nullish-coalescing.md b/packages/eslint-plugin/docs/rules/prefer-nullish-coalescing.md index 5be277ecc733..d2fc95f4066a 100644 --- a/packages/eslint-plugin/docs/rules/prefer-nullish-coalescing.md +++ b/packages/eslint-plugin/docs/rules/prefer-nullish-coalescing.md @@ -11,6 +11,10 @@ Because the nullish coalescing operator _only_ coalesces when the original value This rule reports when an `||` operator can be safely replaced with a `??`. +:::caution +This rule will not work as expected if [`strictNullChecks`](https://www.typescriptlang.org/tsconfig#strictNullChecks) is not enabled. +::: + ## Options ### `ignoreTernaryTests`