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
base:main
Are you sure you want to change the base?
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
to82e8533
Compare// Unknown reason, can't get the correct type | ||
const id = node.id as TSESTree.Identifier | TSESTree.StringLiteral; |
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.
I think the build script is using the published package instead of local one. I tried to useworkspace:^
, but still can't build.
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 might be due to nx not seeing the changes toast-spec
?
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.
Do you know how to fix? Or should I leave it?
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 ReportAttention: Patch coverage is
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:
|
Wait formicrosoft/TypeScript#61772 |
microsoft/TypeScript#61772 has been fixed. |
f60ffa6
toe45b631
CompareEnumMember
EnumMember
const computed = 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.
// Unknown reason, can't get the correct type | ||
const id = node.id as TSESTree.Identifier | TSESTree.StringLiteral; |
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 might be due to nx not seeing the changes toast-spec
?
2d56333
tofcc7712
Compare
PR Checklist
Overview