Skip to content
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

Improve number-literal-case rule #490

Merged
merged 8 commits into from
Dec 30, 2019

Conversation

fisker
Copy link
Collaborator

@fisker fisker commented Dec 27, 2019

  1. Make it work on BigInt, previously crashes on BigInt, since n is upercased.
  2. Lowercase e for exponential notation.
  3. Add MDN links

fixes: #491

@sindresorhus
Copy link
Owner

Question: should this work on BigInt ? need rename rule?

Yeah, I think it should work on BigInt too. I don't think it's necessary to rename the rule. BigInt is a number too. We can just make it explicit in the description that it works on normal number and BigInt numbers.

@fisker
Copy link
Collaborator Author

fisker commented Dec 28, 2019

I'll fix it today

@fisker fisker changed the title Fix number-literal-case crash on BigInt literal Improve number-literal-case rules Dec 28, 2019
@fisker fisker changed the title Improve number-literal-case rules Improve number-literal-case rule Dec 28, 2019
@fisker fisker requested a review from sindresorhus December 28, 2019 05:19
@sindresorhus sindresorhus merged commit cea1346 into sindresorhus:master Dec 30, 2019
@sindresorhus
Copy link
Owner

Nice work 👌

@fisker fisker deleted the fix-number-literal-case branch December 31, 2019 00:00
kevinoid added a commit to kevinoid/eslint-config-kevinoid that referenced this pull request Feb 1, 2020
BREAKING CHANGE: eslint-plugin-unicorn requires Node.js 10
(sindresorhus/eslint-plugin-unicorn@d2ffe2c) and changes the
number-literal-case to require lower-case 'e'
(sindresorhus/eslint-plugin-unicorn#490).

Fixes: #8

Signed-off-by: Kevin Locke <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Need improve number-literal-case rule
2 participants