Skip to content

eslint/no-loss-of-precision Correctness

This rule is turned on by default.

What it does

Disallow precision loss of number literal

Why is this bad?

It can lead to unexpected results in certain situations For example, when performing mathematical operations

Example

javascript
var x = 2e999;

References

Released under the MIT License.