Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
feross opened this issue Mar 5, 2017 · 1 comment
Closed

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

feross opened this issue Mar 5, 2017 · 1 comment

Comments

@feross
Copy link
Member

feross commented Mar 5, 2017

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

@feross feross added this to the standard v11 milestone Mar 5, 2017
@feross feross modified the milestones: standard v10, standard v11 Apr 4, 2017
@feross
Copy link
Member Author

feross commented Apr 4, 2017

Moving this up to standard v10 since it's not likely to affect anyone's code.

@lock lock bot locked as resolved and limited conversation to collaborators May 10, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
Archived in project
Development

No branches or pull requests

1 participant