Modify rule S6606: Mention TSConfig's strictNullChecks requirement (#1796)
This commit is contained in:
parent
b78e301311
commit
930ac77273
@ -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 (`??`).
|
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
|
== How to fix it
|
||||||
|
|
||||||
Rewrite the logical expression `||` using `??` on the unchecked operands.
|
Rewrite the logical expression `||` using `??` on the unchecked operands.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user