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
number-literal-case breaks with bigints #812
Comments
It was fixed long time ago #490, are you using old version? |
Ah, maybe you are using a old version of Node.js? Maybe there is actually something wrong in that rule. Can you share what version of Node.js and what parser you are using? That can help |
Sorry for the delayed response. and thanks for the quick reply @fisker! I dug into it a bit more, and I am seeing the same thing with multiple versions of node (14.9.0, 12.18.3). All my direct dependencies are up to date (but possible some nested dependencies are not), but there is only one version of eslint-plugin-unicorn and it is 21.0.0. Looking at the actual rule, the issue seems to be that for BigInts when it grabs the bigint value for a bigint hex literal here https://github.com/sindresorhus/eslint-plugin-unicorn/blob/master/rules/number-literal-case.js#L16, it is a base 10 string rather than a hex string. (eg. |
Located the problem, broken on |
yup, it is! |
Fixed in #815 |
There isn't a good way to write hex big int literals with this rule enabled.
0x7Fn
is marked as an error presumably because of the lower casen
.The text was updated successfully, but these errors were encountered: