no-loss-of-precision
Disallow literal numbers that lose precision.
✅
Extending "plugin:@typescript-eslint/recommended"
in an ESLint configuration enables this rule.
This rule extends the base eslint/no-loss-of-precision
rule.
It adds support for numeric separators.
How to Use
.eslintrc.cjs
module.exports = {
"rules": {
// Note: you must disable the base rule as it can report incorrect errors
"no-loss-of-precision": "off",
"@typescript-eslint/no-loss-of-precision": "error"
}
};
Options
See eslint/no-loss-of-precision
options.
Resources
Taken with ❤️ from ESLint core