eslint/no-loss-of-precision Correctness
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;
How to use
To enable this rule in the CLI or using the config file, you can use:
bash
oxlint --deny no-loss-of-precision
json
{
"rules": {
"no-loss-of-precision": "error"
}
}