Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork2.8k
feat(typescript-estree): forbid invalid keys inEnumMember#11232
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
feat(typescript-estree): forbid invalid keys inEnumMember#11232
Uh oh!
There was an error while loading.Please reload this page.
Conversation
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 onhttps://opencollective.com/typescript-eslint. |
netlifybot commentedMay 21, 2025 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
✅ Deploy Preview fortypescript-eslint ready!
To edit notification comments on pull requests, go to yourNetlify project configuration. |
nx-cloudbot commentedMay 21, 2025 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
View yourCI Pipeline Execution ↗ for commit8908efb.
☁️Nx Cloud last updated this comment at |
45c92cb to82e8533CompareUh oh!
There was an error while loading.Please reload this page.
codecovbot commentedMay 21, 2025 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
Codecov Report❌ Patch coverage is
❌ Your patch status has failed because the patch coverage (69.04%) is below the target coverage (90.00%). You can increase the patch coverage or adjust thetarget coverage. Additional details and impacted files@@ Coverage Diff @@## main #11232 +/- ##==========================================- Coverage 90.85% 90.83% -0.03%========================================== Files 501 501 Lines 50901 50922 +21 Branches 8383 8381 -2 ==========================================+ Hits 46248 46253 +5- Misses 4638 4654 +16 Partials 15 15
Flags with carried forward coverage won't be shown.Click here to find out more.
🚀 New features to boost your workflow:
|
fisker commentedMay 27, 2025
Wait formicrosoft/TypeScript#61772 |
fisker commentedJun 8, 2025
microsoft/TypeScript#61772 has been fixed. |
f60ffa6 toe45b631CompareEnumMemberEnumMember| constcomputed=node.name.kind===ts.SyntaxKind.ComputedPropertyName; | ||
| if(computed){ | ||
| this.#throwUnlessAllowInvalidAST( | ||
| node.name, | ||
| 'Computed property names are not allowed in enums.', | ||
| ); | ||
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
It looks like computed members are still allowed in the nightly (which includes the fix formicrosoft/TypeScript#61772)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
microsoft/TypeScript#61772 forbids bigint, may computed string literals not be forbidden? I'll ask.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
Added a test for it8908efb (#11232), TS already confirmed it's bug. Should be good to forbid.
Uh oh!
There was an error while loading.Please reload this page.
2d56333 tofcc7712Compare
bradzacher left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
thanks!
d50a6b1 intotypescript-eslint:mainUh oh!
There was an error while loading.Please reload this page.
…typescript-estree): forbi…"This reverts commit7648622.
…typescript-estree): forbi…"This reverts commit7648622.

PR Checklist
Overview