Skip to content
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

Enhancement: Add test-only console warnings to deprecated AST properties #6469

Closed
4 tasks done
JoshuaKGoldberg opened this issue Feb 15, 2023 · 0 comments
Closed
4 tasks done
Assignees
Labels
accepting prs Go ahead, send a pull request that resolves this issue enhancement New feature or request
Milestone

Comments

@JoshuaKGoldberg
Copy link
Member

JoshuaKGoldberg commented Feb 15, 2023

Before You File a Proposal Please Confirm You Have Done The Following...

Relevant Package

typescript-estree

My proposal is suitable for this project

  • I believe my proposal would be useful to the broader TypeScript community (meaning it is not a niche proposal).

Description

From @bradzacher's suggestion in #5384 (comment), which renamed many properties from typeParameters to typeArguments:

Thinking about this in terms of the broader ecosystem and the impacts - I wonder if we want to give consumers one major version to migrate? A hard cut over might be a bit difficult for the ecosystem to come handle as it would involve every single plugin updating their code (which could leave users in an impossible to upgrade state for some time).

How about this: this version we add the new property and we mark the old property as @deprecated, then in v7 we remove the old property entirely.

If we wanted we could also do something like define a getter that throws when in a test environment to help flag plugins that they should migrate.

#5384 kept the old properties as @deprecated but didn't add a getter.

Additional Info

No response

@JoshuaKGoldberg JoshuaKGoldberg added enhancement New feature or request accepting prs Go ahead, send a pull request that resolves this issue labels Feb 15, 2023
@JoshuaKGoldberg JoshuaKGoldberg added this to the 6.0.0 milestone Feb 15, 2023
@JoshuaKGoldberg JoshuaKGoldberg self-assigned this Feb 23, 2023
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 21, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
accepting prs Go ahead, send a pull request that resolves this issue enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants