-
-
Notifications
You must be signed in to change notification settings - Fork 2.8k
fix(typescript-estree): add TSEnumBody node for TSEnumDeclaration body #8920
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): add TSEnumBody node for TSEnumDeclaration body #8920
Conversation
Thanks for the PR, @JoshuaKGoldberg! 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 site configuration. |
}, | ||
], | ||
errors: [{ messageId: 'after', type: AST_TOKEN_TYPES.Block, line: 3 }], | ||
}, |
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.
This rule is being removed in #8833 anyway. I didn't feel like fixing up bugs in it. 🔪
packages/eslint-plugin-internal/src/rules/prefer-ast-types-enum.ts
Outdated
Show resolved
Hide resolved
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.
note: we're deleting this in v8
Co-authored-by: Brad Zacher <brad.zacher@gmail.com>
Co-authored-by: Brad Zacher <brad.zacher@gmail.com>
#8920) * fix(typescript-estree): add TSEnumBody node for TSEnumDeclaration body * Fixed up tests and their snapshots * More about enums * Indent too * Update packages/ast-spec/src/special/TSEnumBody/spec.ts Co-authored-by: Brad Zacher <brad.zacher@gmail.com> * parent types touchups * Update packages/visitor-keys/src/visitor-keys.ts Co-authored-by: Brad Zacher <brad.zacher@gmail.com> --------- Co-authored-by: Brad Zacher <brad.zacher@gmail.com>
* feat(typescript-estree): remove slow deprecated and isolated programs (#8834) * feat(typescript-estree): remove slow deprecated and isolated programs * Update packages/typescript-estree/src/create-program/createProjectProgram.ts Co-authored-by: Brad Zacher <brad.zacher@gmail.com> --------- Co-authored-by: Brad Zacher <brad.zacher@gmail.com> * fix(typescript-estree): add TSEnumBody node for TSEnumDeclaration body (#8920) * fix(typescript-estree): add TSEnumBody node for TSEnumDeclaration body * Fixed up tests and their snapshots * More about enums * Indent too * Update packages/ast-spec/src/special/TSEnumBody/spec.ts Co-authored-by: Brad Zacher <brad.zacher@gmail.com> * parent types touchups * Update packages/visitor-keys/src/visitor-keys.ts Co-authored-by: Brad Zacher <brad.zacher@gmail.com> --------- Co-authored-by: Brad Zacher <brad.zacher@gmail.com> * remove getTypeArguments * one lil ' --------- Co-authored-by: Josh Goldberg ✨ <git@joshuakgoldberg.com> Co-authored-by: Brad Zacher <brad.zacher@gmail.com>
* feat(typescript-estree): remove slow deprecated and isolated programs (#8834) * feat(typescript-estree): remove slow deprecated and isolated programs * Update packages/typescript-estree/src/create-program/createProjectProgram.ts Co-authored-by: Brad Zacher <brad.zacher@gmail.com> --------- Co-authored-by: Brad Zacher <brad.zacher@gmail.com> * fix(typescript-estree): add TSEnumBody node for TSEnumDeclaration body (#8920) * fix(typescript-estree): add TSEnumBody node for TSEnumDeclaration body * Fixed up tests and their snapshots * More about enums * Indent too * Update packages/ast-spec/src/special/TSEnumBody/spec.ts Co-authored-by: Brad Zacher <brad.zacher@gmail.com> * parent types touchups * Update packages/visitor-keys/src/visitor-keys.ts Co-authored-by: Brad Zacher <brad.zacher@gmail.com> --------- Co-authored-by: Brad Zacher <brad.zacher@gmail.com> * chore(type-utils)!: remove IsNullableTypeOptions interface --------- Co-authored-by: Josh Goldberg ✨ <git@joshuakgoldberg.com> Co-authored-by: Brad Zacher <brad.zacher@gmail.com>
BREAKING CHANGE:
Deprecates an existing property on the AST
PR Checklist
Overview
Marks
TSEnumDeclaration
'smembers
property as@deprecated
in favor of a newbody
property of a new typeTSEnumBody
. Adds a getter with similarprocess.emitWarning
logic to our existing deprecated getters.