no-loss-of-precision
Disallow literal numbers that lose precision.
Attributes
- Included in configs
- ✅ Recommended
- 🔒 Strict
- Fixable
- 🔧 Automated Fixer
- 🛠 Suggestion Fixer
- 💭 Requires type information
Rule Details
This rule extends the base eslint/no-loss-of-precision
rule.
It adds support for numeric separators.
Note that this rule requires ESLint v7.
How to Use
{
// 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"]
}
Taken with ❤️ from ESLint core