diff --git a/rules/S6606/javascript/rule.adoc b/rules/S6606/javascript/rule.adoc index b13b798fdb..8c1c3dd00e 100644 --- a/rules/S6606/javascript/rule.adoc +++ b/rules/S6606/javascript/rule.adoc @@ -4,6 +4,8 @@ The nullish coalescing operator `??` allows providing a default value when deali This rule reports when disjunctions (`||`) and conditionals (`?`) can be safely replaced with coalescing (`??`). +The TSConfig needs to set `strictNullChecks` to `true` for the rule to work properly. + == How to fix it Rewrite the logical expression `||` using `??` on the unchecked operands.