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

Interest: adding a test:eslint-compat script for upstream ESLint ecosystem tests? #2552

Open
JoshuaKGoldberg opened this issue Feb 6, 2025 · 4 comments

Comments

@JoshuaKGoldberg
Copy link

JoshuaKGoldberg commented Feb 6, 2025

👋 Coming over from eslint/eslint#19139 -> eslint/rfcs#127: we're working on an RFC in ESLint core to add "ecosystem tests". We'd like to test popular third-party plugins such as eslint-plugin-unicorn as part of ESLint's CI. The goal is to detect API breakages before versions of ESLint or plugins are published that are incompatible with each other.

The current version of the RFC suggests:

  • Plugins would add a test:eslint-compat script to run rule tests
  • ESLint would add a CI job that runs installation, build, and then the test:eslint-compat job for each plugin

Question: is this something that would be ok to add in this repo?

The RFC is also still very much open for comments if anybody is interested! 🙂

@JoshuaKGoldberg JoshuaKGoldberg changed the title Interest: adding a test:eslint-compat script for upstream ESLint ecosystem tests Interest: adding a test:eslint-compat script for upstream ESLint ecosystem tests? Feb 6, 2025
@fisker
Copy link
Collaborator

fisker commented Feb 7, 2025

Personally I'm fine to add it.
What I can't understand is why it's necessary to add a special script.
Can't we try run "test" by default?
Or can't we have a configuration file to tell what to run for each plugin?

@sindresorhus
Copy link
Owner

I'm fine with this too.

@JoshuaKGoldberg
Copy link
Author

What I can't understand is why it's necessary to add a special script.
Can't we try run "test" by default?
Or can't we have a configuration file to tell what to run for each plugin?

Some repos attach more than just ESLint/rule tests to the test script. Examples:

  • This repo has both lint and test:*
  • typescript-eslint runs tests for everything from rules to utility packages

The RFC's idea was that a specific test:eslint-compat script would let plugins choose exactly what they want tested for compatibility.

Are you thinking you'd want everything to be tested for compatibility? E.g. including lint?

@fisker
Copy link
Collaborator

fisker commented Feb 7, 2025

No, I mean, the test should run test script by default, but run test:js for us. This should be done on ESLint side, not plugin side. Add a script that not used by us is strange, and we don't even know when ESLint will stop running tests for us. In my experience, most integration tests not
done on the client side.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants