The configuration of tslint: strict-boolean-expressions currently prevents using short-circuit evaluation in assignment as per Airbnb's 15.7 no-unneeded-ternary:
This type is not allowed in the operand for the '||' operator because it is always truthy.
There's an issue palantir/tslint#3279 concerning the application of strict-boolean-expressions in different contexts that will hopefully allow excluding assignments - which would support loosening the rule to support compliance with no-unneeded-ternary.
Meanwhile there is no ideal setting, but I've currently overridden the rule to the following:
"strict-boolean-expressions": [
true,
"allow-null-union",
"allow-undefined-union",
"allow-string",
"allow-mix"
]
It's not ideal... 😐 but helps compliance with 15.7 for string building and assignment (at the cost of compliance with 15.3), while not allowing numbers prevents using array length without a comparison which seems to be the most common violation of 15.3 at the cost of excluding use of numbers in logical assignment.
I appreciate there are a lot of inconsistencies with the eslint implementation due largely to rule availability and differing coding standards - so mainly just flagging the open tslint issue and more generally interested in your thoughts?