We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
https://eslint.org/docs/rules/no-unneeded-ternary
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);
The text was updated successfully, but these errors were encountered:
@otakustay
Sorry, something went wrong.
No branches or pull requests
https://eslint.org/docs/rules/no-unneeded-ternary
no-unneeded-ternary
检查非必要的三元表达式。The text was updated successfully, but these errors were encountered: