Skip to content

Do not issue Left side of comma operator is unused and has no side effects error on (0, expr) this-removing pattern #48163

Closed
@weswigham

Description

@weswigham

Both our and babel's output emits (0, expr) in many places to unbind the this from the call that's about to be done. Ergo, the 0, expr pattern is not without side-effects, and is, in fact, a very highly used pattern that we probably shouldn't issue an error on. It's probably OK to special-case the literal-zero LHS as a signal to silence the error.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions