You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
While I like the nursery/noImplicitCoercion rule a lot, !! is rather commonly used and cannot be disallowed in our project. I hope this rule could be updated to have options to allow some shorthands while disallowing others (like the original ESLint no-implicit-coercion rule has).
In my 10+ years of professional JS development, I've seen and used !! a lot, while I have practically never seen or used the other coercion shorthands. Also noteworthy is that every developer knows what ! does, so it's relatively easy to deduce what !! does even if you've never seen it. The same cannot be said of the other coercions like +value which requires you to know details of the JS coercion system.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
-
Hi!
While I like the nursery/noImplicitCoercion rule a lot,
!!
is rather commonly used and cannot be disallowed in our project. I hope this rule could be updated to have options to allow some shorthands while disallowing others (like the original ESLint no-implicit-coercion rule has).In my 10+ years of professional JS development, I've seen and used
!!
a lot, while I have practically never seen or used the other coercion shorthands. Also noteworthy is that every developer knows what!
does, so it's relatively easy to deduce what!!
does even if you've never seen it. The same cannot be said of the other coercions like+value
which requires you to know details of the JS coercion system.Beta Was this translation helpful? Give feedback.
All reactions