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

feat: Introduce ecosystem tests for popular third-party plugins #127

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

JoshuaKGoldberg
Copy link
Contributor

Summary

Adding an CI job to the eslint/eslint repo that checks changes against a small selection of third-party plugins.

Related Issues

eslint/eslint#19139

@fasttime fasttime added the Initial Commenting This RFC is in the initial feedback stage label Nov 26, 2024
2. Run a lint command (i.e. `npx eslint .`) in that directory
3. Assert that the lint command passed with 0 lint reports.

This will all be runnable locally with a `package.json` script like `npm run test:ecosystem --plugin unicorn`.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
This will all be runnable locally with a `package.json` script like `npm run test:ecosystem --plugin unicorn`.
This will all be runnable locally with a `package.json` script like `npm run test:ecosystem --plugin eslint-plugin-unicorn`.

The CI job uses eslint-plugin-unicorn.

Comment on lines +72 to +77
In the case of a breakage being discovered, this RFC proposes the following process:

1. An ESLint team member should file a bug report on the plugin's repository -if it doesn't yet exist-, as well as an issue on `eslint/eslint` linking to that bug report
2. If the issue isn't resolved within two weeks:
1. The plugin will be removed from ESLint's ecosystem CI job
2. An ESLint team member should file a followup issue to re-add it once the breakage is fixed
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this the process for pull requests that cause breakages in a third party plugin? If so, I think it's not necessary to file an extra issue in the eslint repo. The pull request seems the best place to keep track of the problem since it cannot be merged until the problem is fixed in the plugin or the ecosystem test is disabled.

It's not clear though how breakages will be handled if they occur in the main branch for some reason.

Comment on lines +118 to +120
Automation could be added for at least the filing of issues on plugin failures.
That does not seem worth the time expenditure given how rarely plugins are expected to fail.
Is that accurate?
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I agree this automation isn't necessary, and we'll probably want to double-check the PR and/or the testing before filing an issue.

Comment on lines +108 to +112
However, to be safe, this RFC proposes adding a CI job in three steps:

1. On a branch that and updated from `main` several times a week
2. On the `main` branch only
3. On all branches, alongside existing CI jobs
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think the point is to catch the problem before merging a PR, so just 2. and 3., both from the start, makes the most sense to me.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As for 3., I think "all branches" -> "all PRs targeting the main branch" would better clarify it (assuming that was the intent).

@voxpelli
Copy link

That none of the eslint-community plugins are included feels a bit odd? Since it's somewhat operated under the same umbrella as ESLint itself?

At least one of eg eslint-plugin-n, eslint-plugin-promise or eslint-plugin-security would be good to include?

I also note that the selection criteria is similar to those outlined in the suggested eslint-community governance, and which have gotten feedback / objections / concerns there: eslint-community/governance#1 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature Initial Commenting This RFC is in the initial feedback stage
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants