Skip to content

preferLogicalOperatorOverTernary

ESLint rule reporting what unicorn/prefer-logical-operator-over-ternary reports, fixing a ternary with a boolean literal branch in a TypeScript file too.

Import:

import { preferLogicalOperatorOverTernary } from '@mnaoumov/typescript-dev-toolkit/linters/eslint-rules/prefer-logical-operator-over-ternary';

Signature:

const preferLogicalOperatorOverTernary: Rule.RuleModule

Type: Rule.RuleModule