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

Prepare the plugin for flat config #853

Open
Tracked by #18093
Belco90 opened this issue Dec 11, 2023 · 5 comments
Open
Tracked by #18093

Prepare the plugin for flat config #853

Belco90 opened this issue Dec 11, 2023 · 5 comments
Assignees
Labels
BREAKING CHANGE This change will require a major version bump v7 Next major v7

Comments

@Belco90
Copy link
Member

Belco90 commented Dec 11, 2023

Plugin version

n/a

What problem do you want to solve?

Your take on the correct solution?

Apply the changes mentioned in the linked migration docs so the plugin is compatible with flat config mechanism

Anything else?

No response

Do you want to submit a pull request to implement this change?

Yes

@Belco90 Belco90 added enhancement New feature or request triage Pending to be triaged by a maintainer labels Dec 11, 2023
@Belco90 Belco90 self-assigned this Dec 11, 2023
@Belco90 Belco90 removed the triage Pending to be triaged by a maintainer label Dec 11, 2023
@Belco90 Belco90 pinned this issue Jan 14, 2024
@Belco90 Belco90 added BREAKING CHANGE This change will require a major version bump v7 Next major v7 and removed enhancement New feature or request labels Apr 16, 2024
@Belco90
Copy link
Member Author

Belco90 commented Apr 16, 2024

Adding backwards compatibility is a bit painful, so I'll implement the ESLint v9 compatibility changes as part of the next major version of the plugin.

@Belco90 Belco90 changed the title Prepare the plugin for ESLint v9 Prepare the plugin for flat config Apr 16, 2024
@studioswong
Copy link

Hello, @Belco90, thank you for setting this up as I can envision this being a pressing issue as more and more of us start to look into migrating to ESLint v9 and changing to use flat config.

While the related changes for compatibility for ESLint v9 are being implemented, are there any way for us to specify using the eslint-plugin-testing-library as a plugin in flat config ?( I am still on ESLint v8.57 so technically should still be able to use the testing library plugin, just that we have migrated to use flat config in preparation for the migration)

I have tried the typical way of importing the library and specifying it as a plugin under plugins, as per recommendations for the migration guide, but unfortunately it doesn't work. Not sure if there is a specific way that I should specify the plugin? ( such as specifying it diirectly in the config array like how we usually use for extends in the old config setup?)

Thank you!

@Belco90
Copy link
Member Author

Belco90 commented Apr 18, 2024

Hey @studioswong! I don't think there is a way to make the plugin compatible with ESLint v9 until we released the corresponding changes, so I'm afraid you'll have to wait until the next version of the plugin.

I'm working on it already, you can follow the progress here: https://github.com/orgs/testing-library/projects/19

edit:

To make it clear, you can use the plugin with ESLint v9 if not using the new flat config. Otherwise, this ticket must be addressed for flat config compatibility.

@studioswong
Copy link

Thank you so much for your speedy reply @Belco90 ! Gotcha - So basically it's all down to flat config and not ESLint v9 😄

Really looking forward to your work with the support for flat configs - I'm sure a lot of users will come across this soon in the coming weeks! and thanks so much for the great work with this plugin!

@Belco90
Copy link
Member Author

Belco90 commented May 2, 2024

Adding backwards compatibility is a bit painful, so I'll implement the ESLint v9 compatibility changes as part of the next major version of the plugin.

Finally keeping backwards compatibility with RC config, but those configs will be renamed with a -legacy suffix so this will be a breaking change anyway.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
BREAKING CHANGE This change will require a major version bump v7 Next major v7
Projects
Status: In Progress
Development

No branches or pull requests

2 participants