ESLint is telling me this error message inside my JS module: error no-unneeded-ternary Unnecessary use of conditional expression for default assignment
// Bad foo(bar ? bar : 1); // Good foo(bar || 1);
This is how they say in Es-lint
You don't need a ternary when a simple val || defaultVal will do.
val || defaultVal