Not everyone is in agreement about the use of ternary expressions, favoring instead
if..else if..else for its literalness. The jury is still out for me, but I don’t work in a production environment or collaboratively. There is good reason to have and to follow an organization’s style guide since it promotes uniformity and consistency.
There’s always an exception to every rule, so don’t rule this approach out, entirely, just know how to keep in step with your fellow collaborators.