Skip to content

Bug: no-loss-of-precision false positive #15767

@jjspace

Description

@jjspace

Environment

Node version: 16.3.1
npm version: 8.1.2
Local ESLint version: 8.12.0
Global ESLint version: none
Operating System: Kubuntu 20

What parser are you using?

Default (Espree)

What did you do?

const test = 555.9771118164062

eslint demo

What did you expect to happen?

This value is actually fine from my testing in chrome, brave, firefox and node console. it shouldn't be marked as an error

What actually happened?

eslint reported a problem with the no-loss-of-precision rule

Participation

  • I am willing to submit a pull request for this issue.

Additional comments

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    acceptedThere is consensus among the team that this change meets the criteria for inclusionarchived due to ageThis issue has been archived; please open a new issue for any further discussiondocumentationRelates to ESLint's documentation

    Type

    No type

    Projects

    Status

    Complete

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions