Skip to content

Disallow comparing against -0 (no-compare-neg-zero) #812

@feross

Description

@feross

The rule should warn against code that tries to compare against -0, since that will not work as intended. That is, code like x === -0 will pass for both +0 and -0. The author probably intended Object.is(x, -0).

http://eslint.org/docs/rules/no-compare-neg-zero

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    Status

    Done

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions