Disallow ternary operators
The ternary operator is used to conditionally assign a value to a variable. Some believe that the use of ternary operators leads to unclear code.
This rule disallows ternary operators.
Examples of incorrect code for this rule:
Examples of correct code for this rule:
This rule was introduced in ESLint v0.0.9.
© OpenJS Foundation and other contributors
Licensed under the MIT License.
https://eslint.org/docs/latest/rules/no-ternary