Skip to content

fix(typescript-estree): use token type of Numeric instead of Identifier for bigint literals #11021

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

Merged
merged 2 commits into from
Apr 1, 2025

Conversation

ronami
Copy link
Member

@ronami ronami commented Apr 1, 2025

PR Checklist

Overview

This PR addresses #11018 and changes the token type to use Numeric rather than Identifier. I added a test to cover this since no tests failed by making this change.

@typescript-eslint
Copy link
Contributor

Thanks for the PR, @ronami!

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.

Copy link

netlify bot commented Apr 1, 2025

Deploy Preview for typescript-eslint ready!

Name Link
🔨 Latest commit eb75aba
🔍 Latest deploy log https://app.netlify.com/sites/typescript-eslint/deploys/67ec09f82e878800080e2e97
😎 Deploy Preview https://deploy-preview-11021--typescript-eslint.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
Lighthouse
Lighthouse
1 paths audited
Performance: 90 (🔴 down 4 from production)
Accessibility: 100 (no change from production)
Best Practices: 100 (no change from production)
SEO: 98 (no change from production)
PWA: 80 (no change from production)
View the detailed breakdown and full score reports

To edit notification comments on pull requests, go to your Netlify site configuration.

@ronami ronami changed the title fix(ast-spec): use token type of Numeric instead of Identifier for bigint literals fix(ast-spec): use token type of Numeric instead of Identifier for bigint literals Apr 1, 2025
Copy link

nx-cloud bot commented Apr 1, 2025

View your CI Pipeline Execution ↗ for commit eb75aba.

Command Status Duration Result
nx run-many --target=clean ✅ Succeeded 10s View ↗

☁️ Nx Cloud last updated this comment at 2025-04-01 21:34:31 UTC

@ronami ronami marked this pull request as ready for review April 1, 2025 15:41
@@ -527,6 +527,7 @@ export function getTokenType(

switch (token.kind) {
case SyntaxKind.NumericLiteral:
case SyntaxKind.BigIntLiteral:
Copy link

Choose a reason for hiding this comment

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

Since we are here, could you also take a look at #11022? Many thanks.

Copy link
Member Author

Choose a reason for hiding this comment

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

#11023 🎉

@bradzacher bradzacher changed the title fix(ast-spec): use token type of Numeric instead of Identifier for bigint literals fix(typescript-estree): use token type of Numeric instead of Identifier for bigint literals Apr 1, 2025
@bradzacher bradzacher merged commit f0072dc into typescript-eslint:main Apr 1, 2025
60 of 61 checks passed
@ronami ronami deleted the bigint-literal-token-type branch April 1, 2025 21:46
aryaemami59 pushed a commit to aryaemami59/typescript-eslint that referenced this pull request Apr 5, 2025
…ifier` for bigint literals (typescript-eslint#11021)

* initial implementation

* rename folder
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Apr 9, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Bug: The token type of a BigInt literal should be Numeric instead of Identifier
3 participants