Skip to content

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

Merged
merged 7 commits into from
Apr 15, 2024

Conversation

JoshuaKGoldberg
Copy link
Member

@JoshuaKGoldberg JoshuaKGoldberg commented Apr 14, 2024

BREAKING CHANGE:
Deprecates an existing property on the AST

PR Checklist

Overview

Marks TSEnumDeclaration's members property as @deprecated in favor of a new body property of a new type TSEnumBody. Adds a getter with similar process.emitWarning logic to our existing deprecated getters.

@typescript-eslint
Copy link
Contributor

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.

Copy link

netlify bot commented Apr 14, 2024

Deploy Preview for typescript-eslint ready!

Name Link
🔨 Latest commit 48b32bc
🔍 Latest deploy log https://app.netlify.com/sites/typescript-eslint/deploys/661c48aa98a4270008b3f76e
😎 Deploy Preview https://deploy-preview-8920--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: 98 (🔴 down 1 from production)
Accessibility: 100 (no change from production)
Best Practices: 92 (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.

@JoshuaKGoldberg JoshuaKGoldberg changed the base branch from main to v8 April 14, 2024 22:23
},
],
errors: [{ messageId: 'after', type: AST_TOKEN_TYPES.Block, line: 3 }],
},
Copy link
Member Author

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. 🔪

@JoshuaKGoldberg JoshuaKGoldberg marked this pull request as ready for review April 15, 2024 11:42
@bradzacher bradzacher added the breaking change This change will require a new major version to be released label Apr 15, 2024
Copy link
Member

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

JoshuaKGoldberg and others added 3 commits April 15, 2024 10:29
Co-authored-by: Brad Zacher <brad.zacher@gmail.com>
Co-authored-by: Brad Zacher <brad.zacher@gmail.com>
@JoshuaKGoldberg JoshuaKGoldberg merged commit faa74c5 into typescript-eslint:v8 Apr 15, 2024
53 checks passed
@JoshuaKGoldberg JoshuaKGoldberg deleted the ts-enum-body branch April 15, 2024 15:22
JoshuaKGoldberg added a commit that referenced this pull request Apr 22, 2024
#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>
JoshuaKGoldberg added a commit that referenced this pull request Apr 22, 2024
* 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>
JoshuaKGoldberg added a commit that referenced this pull request Apr 23, 2024
* 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>
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Apr 23, 2024
@bradzacher bradzacher added this to the 8.0.0 milestone Jun 4, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
breaking change This change will require a new major version to be released
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Align AST for TSEnumDeclaration with TSInterfaceDeclaration, TSModuleDeclaration, etc
2 participants