no-extra-boolean-cast- Do not use
!!,Boolean(), or another unnecessary cast in a context that already evaluates a value as boolean. - Disallow unnecessary boolean casts.
- Do not use
strict-boolean-expressions- Do not depend on implicit truthy/falsy conversion in a boolean context; test explicitly. (e.g. Don't:
if (name), Do:if (name !== "")) - Forbids usage of non-boolean types in expressions where a boolean is expected. Boolean and never types are always allowed. Additional types considered safe in a boolean context can be configured through options.
- Do not depend on implicit truthy/falsy conversion in a boolean context; test explicitly. (e.g. Don't: