New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[no-loss-of-precision] The rule reports false positives for values with numeric separators #13346
Comments
I think it should be reported in 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 |
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. |
Thanks, I'll be waiting for it :) |
Hi everyone, I hit this issue today as well, and it's potential problem in here. 🙂 Fan fact, is that Numeric separators are broadly used in many projects and supported already by ALL modern browsers and node as well, for about of one year. At the moment, it's impossible to use this new rule in any project that's already use separators in codebase. It should be at least a way, to add an option to this rule to allow the character / code to be specified in numbers. 🤠 |
While we can't implement support until this reaches stage 4, it might be worth checking out |
I have checked rule with |
The core In the meantime, if you're using If you're using |
Unfortunately, it looks like there wasn't enough interest from the team Thanks for contributing to ESLint and we appreciate your understanding. |
Numeric separators are stage 4 now. #13568 tracks everything that should be updated to support this syntax, and that includes |
Fixed by #13574, ESLint v7.8.0 |
Tell us about your environment
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.
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 🙂
The text was updated successfully, but these errors were encountered: