Possible Errors

Best Practices

Strict Mode

Variables

Node.js and CommonJS

Stylistic Issues

ECMAScript 6

no-unneeded-ternary

- Disallow ternary operators when simpler alternatives exist

Fixable

This rule disallow ternary operators when simpler alternatives exist.

What ESLint should do when it catches the rule break

Show a warning

Options

defaultAssignment

Allows the conditional expression as a default assignment pattern.

Rule examples

You can check them out here.