https://eslint.org/docs/rules/no-unneeded-ternary
no-unneeded-ternary 检查非必要的三元表达式。
// Bad
var isYes = answer === 1 ? true : false;
// Good
var isYes = answer === 1;
// Bad
var isNo = answer === 1 ? false : true;
// Good
var isNo = answer !== 1;
// Bad
foo(bar ? bar : 1);
// Good
foo(bar || 1);