[no-loss-of-precision] The rule reports false positives for values with numeric separators
See original GitHub issueTell us about your environment
- ESLint Version: v7.1.0
- Node Version: v14.0.0
- npm Version: v6.14.4
What parser (default, Babel-ESLint, etc.) are you using?
@typescript-eslint/parser
Please show your full configuration:
It’s in a public repository: https://github.com/ridedott/eslint-config
What did you do? Please include the actual source code causing the issue, as well as the command that you used to run ESLint.
const x = 1_000;
eslint --cache --cache-location './.cache/eslint' --fix '**/*.ts'
What did you expect to happen?
I expected not to see a no-loss-of-precision
issue reported for this number.
What actually happened? Please include the actual, raw output from ESLint.
An issue is reported for this rule.
Are you willing to submit a pull request to fix this bug?
Yes, if the rule creator won’t do it themself 🙂
Issue Analytics
- State:
- Created 3 years ago
- Comments:10 (6 by maintainers)
Top Results From Across the Web
@typescript-eslint/eslint-plugin | Yarn - Package Manager
eslint-plugin: [no-shadow] handle false positives on generics and parameters ... typescript-estree: handle BigInt with _ numeric separator (#2067 (66f1627) ...
Read more >Changelog - JavaScript Standard Style
This pre-release exists to test out the ESLint 8 related changes and discover possible backwards incompatible changes that comes with it and mitigate...
Read more >jsonc/no-numeric-separators | eslint-plugin-jsonc
This rule reports the use of numeric separators. 1. 2. 3. 4. 5. 6. 7. 8. 9. /* eslint jsonc/no-numeric-separators: 'error' */.
Read more >eslint-config-canonical - npm
Rule CN AB GG SD XO
@babel/new‑cap ❌ 👻 👻 👻 👻
@babel/no‑invalid‑this 🚨 👻 👻 👻 👻
@babel/no‑unused‑expressions 🚨 👻 👻 👻 👻
Read more >ASCII text (1168K bytes) - GNU.org
Indices in Table are ASCII values incremented by one. Indices 1-256 classify chars (0 = nothing special, 2 = separator, 48 = digit,...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
As @anikethsaha mentions above, this is still currently experimental syntax. We will add support for this syntax in core rules once it reaches stage 4.
I think it should be reported in
typescript-eslint
repo ?cause numeric-separator is still in Stage 3 and eslint doesnt support stage 3 proposal .
also, the compiled JS for this TS code is working fine with eslint