Skip to content
This repository has been archived by the owner on Mar 25, 2021. It is now read-only.

no-magic-number don't handle negative zero well #3840

Closed
7sDream opened this issue Apr 17, 2018 · 1 comment
Closed

no-magic-number don't handle negative zero well #3840

7sDream opened this issue Apr 17, 2018 · 1 comment

Comments

@7sDream
Copy link

7sDream commented Apr 17, 2018

Bug Report

  • TSLint version: 5.9.1
  • TypeScript version: 2.8.1
  • Running TSLint via: CLI

TypeScript code being linted

console.log(-0)

with tslint.json configuration:

"no-magic-numbers": [true, -2, -1, -0, 0, 1, 2, 3],

PS: VSCode shows Array has duplicate items problem.

Actual behavior

Error:

[1, 13]: 'magic numbers' are not allowed

Expected behavior

No error

@giladgray
Copy link

fixed in #3903

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants