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

fix(typescript-estree): handle BigInt with _ numeric separator #2067

Merged
merged 2 commits into from May 22, 2020

Conversation

fisker
Copy link
Contributor

@fisker fisker commented May 22, 2020

Fix BigInt with numberic separator parsing.

The estree spec only said n should not include in bigint, so I guess _ should perserve.

Update: The spec says bigint property is the string representation of the BigInt value, and we are using String(BigInt('123')) for 1_2_3n, it doesn't includes _, so it should not include _.

@typescript-eslint
Copy link
Contributor

Thanks for the PR, @fisker!

typescript-eslint is a 100% community driven project, and we are incredibly grateful that you are contributing to that community.

The core maintainers work on this in their personal time, so please understand that it may not be possible for them to review your work immediately.

Thanks again!


🙏 Please, if you or your company is finding typescript-eslint valuable, help us sustain the project by sponsoring it transparently on https://opencollective.com/typescript-eslint. As a thank you, your profile/company logo will be added to our main README which receives thousands of unique visitors per day.

@fisker fisker changed the title fix(typescript-estree): error throws on BigInt with numberic separator fix(typescript-estree): error throws on BigInt with numberic separator May 22, 2020
@fisker fisker force-pushed the numberic-separator-bigint branch from 9fd8390 to c5a48b1 Compare May 22, 2020 09:47
@fisker fisker force-pushed the numberic-separator-bigint branch from c5a48b1 to 39e5748 Compare May 22, 2020 09:58
@codecov
Copy link

codecov bot commented May 22, 2020

Codecov Report

Merging #2067 into master will not change coverage.
The diff coverage is 100.00%.

@@           Coverage Diff           @@
##           master    #2067   +/-   ##
=======================================
  Coverage   93.40%   93.40%           
=======================================
  Files         171      171           
  Lines        7745     7745           
  Branches     2210     2210           
=======================================
  Hits         7234     7234           
  Misses        246      246           
  Partials      265      265           
Flag Coverage Δ
#unittest 93.40% <100.00%> (ø)
Impacted Files Coverage Δ
packages/typescript-estree/src/convert.ts 98.88% <100.00%> (ø)

Copy link
Member

@bradzacher bradzacher left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM - thanks for finding and fixing this!

@bradzacher bradzacher added the bug Something isn't working label May 22, 2020
@bradzacher bradzacher changed the title fix(typescript-estree): error throws on BigInt with numberic separator fix(typescript-estree): handle BigInt with _ numeric separator May 22, 2020
@bradzacher bradzacher merged commit 66f1627 into typescript-eslint:master May 22, 2020
@fisker fisker deleted the numberic-separator-bigint branch May 22, 2020 17:48
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jun 22, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants