Closed
Description
The strict-boolean-expressions
rule was added recently, but it's missing many of the options from the TSLint rule. I agree that many of those options makes the rule pointless, but I also think the rule is too strict by default. It results in very verbose code for no good reason.
An option to allow undefined
and null
in the union would be useful. Equivalent to the TSLint allow-null-union
and allow-undefined-union
options.
Such option would allow this pattern which is very common:
if (previousComment && previousComment.closest('.js-timeline-item') !== comment) {
^ Which does a quick null/undefined check before operating on a variable.