-
-
Notifications
You must be signed in to change notification settings - Fork 2.8k
feat(typescript-estree): forbid invalid keys in EnumMember
#11497
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
feat(typescript-estree): forbid invalid keys in EnumMember
#11497
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 on https://opencollective.com/typescript-eslint. |
✅ Deploy Preview for typescript-eslint ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
View your CI Pipeline Execution ↗ for commit fb5506b
☁️ Nx Cloud last updated this comment at |
Looks like this is still an issue, #11232 (comment), any idea to fix it? |
I'm not sure what I did, but CI passes now. |
Codecov Report❌ Patch coverage is
❌ Your patch status has failed because the patch coverage (68.29%) is below the target coverage (90.00%). You can increase the patch coverage or adjust the target coverage. Additional details and impacted files@@ Coverage Diff @@
## main #11497 +/- ##
==========================================
- Coverage 90.87% 90.84% -0.03%
==========================================
Files 505 505
Lines 51146 51167 +21
Branches 8424 8422 -2
==========================================
+ Hits 46480 46485 +5
- Misses 4652 4668 +16
Partials 14 14
Flags with carried forward coverage won't be shown. Click here to find out more.
🚀 New features to boost your workflow:
|
fe02b99
to
2ac5502
Compare
const id = node.id; | ||
TSEnumMember: { | ||
handler: (node: TSESTree.TSEnumMember, validator): void => { | ||
// Unknown reason, can't get the correct type |
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 the problem with these types is that this PR is missing a corresponding change in packages/types/src/ts-estree.ts.
See
typescript-eslint/packages/types/src/ts-estree.ts
Lines 197 to 202 in a0c30f2
interface TSEnumMemberComputedName { | |
parent: TSESTree.TSEnumBody; | |
} | |
interface TSEnumMemberNonComputedName { | |
parent: TSESTree.TSEnumBody; | |
} |
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've pushed de0e9ff to clean them up 👍
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.
Great! Thanks!
Approving in that
Will give @bradzacher a chance to double-check in case before merging |
This reverts commit 7648622.
PR Checklist
EnumMember
#11495Overview