The no-ternary rule only warns you when you use a ternary. It doesn’t know
if the ternary will cause an error when you run it.

On Fri, Apr 17, 2020 at 6:19 PM Paul Gureghian <[email protected]>
wrote:

> [image: Magic_Eight_Ball.PNG]
> The line of code in question:
>
> // Create a ternary expression for 'userName'
> userName
>     ? console.log(`Hello, ${userName}`)
>     : console.log("Hello!");
>
> The script runs properly in spite of this error. Is my ternary correct ?
>
> --
> You received this message because you are subscribed to the Google Groups
> "ESLint" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/eslint/d8f4ae97-709a-4e3b-bf96-a5e53b3cd91a%40googlegroups.com
> <https://groups.google.com/d/msgid/eslint/d8f4ae97-709a-4e3b-bf96-a5e53b3cd91a%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
>

-- 
You received this message because you are subscribed to the Google Groups 
"ESLint" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/eslint/CAOkd9hkLj_LTqWZCeUnscti4cK6KSWAGttXgi%3Dw26fCDRjd3%3DA%40mail.gmail.com.

Reply via email to