question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[no-loss-of-precision] The rule reports false positives for values with numeric separators

See original GitHub issue

Tell 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:closed
  • Created 3 years ago
  • Comments:10 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
kaicataldocommented, May 23, 2020

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.

1reaction
anikethsahacommented, May 23, 2020

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

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found