Urara-Blog/node_modules/.pnpm-store/v3/files/9e/763ad267f3b8b2d9b993f1d6d7f8bf189ef8ea40d5a1a5c73485811cf43854aae93c6c7a8f803048f0c4b3f28f0e8b70c232afb3f5a135da0d487c7cb67339
2022-08-14 01:14:53 +08:00

29 lines
832 B
Text

---
description: 'Disallow literal numbers that lose precision.'
---
> 🛑 This file is source code, not the primary documentation location! 🛑
>
> See **https://typescript-eslint.io/rules/no-loss-of-precision** for documentation.
## Rule Details
This rule extends the base [`eslint/no-loss-of-precision`](https://eslint.org/docs/rules/no-loss-of-precision) rule.
It adds support for [numeric separators](https://github.com/tc39/proposal-numeric-separator).
Note that this rule requires ESLint v7.
## How to Use
```jsonc
{
// 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"]
}
```
<sup>
Taken with ❤️ [from ESLint core](https://github.com/eslint/eslint/blob/main/docs/rules/no-loss-of-precision.md)
</sup>