Closed mjomble closed 3 years ago
I would suggest to continue using !!
as Boolean
would not introduce any benefits.
I generally feel that the double bang syntax is pretty explicit (in comparison to the ESLint naming of "no-implicit-coercion" rule). It's also shorter, so easier to write.
Fair enough 🙂
15.7 lists this as a good example:
and 22.6 considers the
!!
syntax better than the more explicit alternative:In my opinion, this syntax falls into a hacky category with other examples listen in the doc of ESLint's no-implicit-coercion rule.
I propose using this ESLint rule and disallowing the
!!
syntax.