Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.
Sign upDisallow comparing against -0 (no-compare-neg-zero) #812
Comments
feross
added
the
enhancement
label
Mar 5, 2017
feross
added this to the
standard v11 milestone
Mar 5, 2017
feross
modified the milestones:
standard v10,
standard v11
Apr 4, 2017
This comment has been minimized.
This comment has been minimized.
|
Moving this up to |
feross
closed this
in
standard/eslint-config-standard@85f56d8
Apr 4, 2017
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.
feross commentedMar 5, 2017
The rule should warn against code that tries to compare against
-0, since that will not work as intended. That is, code likex === -0will pass for both+0and-0. The author probably intendedObject.is(x, -0).http://eslint.org/docs/rules/no-compare-neg-zero