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

[infra] Create ESLint plugins renovate group #14574

Merged
merged 3 commits into from
Sep 11, 2024

Conversation

LukasTy
Copy link
Member

@LukasTy LukasTy commented Sep 11, 2024

We have numerous eslint-plugin-* dependencies that keep producing conflicts after merging one of the bump PRs.

mui-x/package.json

Lines 144 to 154 in a198b26

"eslint-plugin-filenames": "^1.3.2",
"eslint-plugin-import": "^2.29.1",
"eslint-plugin-jsdoc": "^50.2.2",
"eslint-plugin-jsx-a11y": "^6.9.0",
"eslint-plugin-material-ui": "workspace:^",
"eslint-plugin-mocha": "^10.5.0",
"eslint-plugin-prettier": "^5.2.1",
"eslint-plugin-react": "^7.35.2",
"eslint-plugin-react-compiler": "0.0.0-experimental-9ed098e-20240725",
"eslint-plugin-react-hooks": "^4.6.2",
"eslint-plugin-testing-library": "^6.3.0",

Having them grouped should ease such bumps. 🤞

@LukasTy LukasTy added core Infrastructure work going on behind the scenes scope: code-infra Specific to the core-infra product labels Sep 11, 2024
@LukasTy LukasTy requested a review from a team September 11, 2024 10:50
@LukasTy LukasTy self-assigned this Sep 11, 2024
renovate.json Outdated
@@ -53,6 +53,20 @@
"groupName": "typescript-eslint",
"matchPackagePatterns": "@typescript-eslint/*"
},
{
"groupName": "ESLint plugins",
"matchPackageNames": [
Copy link
Member Author

@LukasTy LukasTy Sep 11, 2024

Choose a reason for hiding this comment

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

I didn't want to use eslint-plugin-* to avoid combining the bumps of

"eslint-plugin-react-compiler": "0.0.0-experimental-9ed098e-20240725",
as it can often have lots of unsolvable problems given the state of the plugin.
For example: #14425

Copy link
Member

Choose a reason for hiding this comment

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

What about enabling eslint-plugin-* and just skip eslint-plugin-react-compiler instead

Copy link
Member Author

Choose a reason for hiding this comment

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

Is there a way to do it for a group config? 🤔

Copy link
Member

@Janpot Janpot Sep 11, 2024

Choose a reason for hiding this comment

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

We use the following rule in Toolpad

    {
      "groupName": "eslint",
      "matchPackageNames": ["eslint"],
      "matchPackagePatterns": ["^eslint-", "^@eslint/", "^@eslint-", "^@typescript-eslint/"]
    },

but you should also be able to just add a negative pattern

"matchPackagePatterns": ["eslint-plugin-*", "!eslint-plugin-react-compiler"]

Copy link
Member

Choose a reason for hiding this comment

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

@LukasTy you can negate pattern like !eslint-plugin-react-compiler

Copy link
Member

Choose a reason for hiding this comment

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

And how do you deal with dependency bumping when eslint-plugin-react-compiler changes are very time consuming?
I would imagine that other ESLint dep bumping might be stuck for a while. 🙈

What do you mean?

This config is just for grouping, meaning eslint-plugin-react-compiler will still bump alone.

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 config is just for grouping, meaning eslint-plugin-react-compiler will still bump alone.

I meant the Toolpad config. 😉
In their case, it looks like the react-compiler plugin would be included in the same group...

Copy link
Member

Choose a reason for hiding this comment

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

Negating didn't work, even though it is documented 🤔
https://docs.renovatebot.com/configuration-options/#matchpackagenames

Copy link
Member Author

Choose a reason for hiding this comment

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

yeah... 🙈 😢
That's what I was afraid of. 😆

Copy link
Member Author

Choose a reason for hiding this comment

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

Looks like my bad: #14577 🙈 🤦

@mui-bot
Copy link

mui-bot commented Sep 11, 2024

Deploy preview: https://deploy-preview-14574--material-ui-x.netlify.app/

Generated by 🚫 dangerJS against 3d82756

@LukasTy LukasTy merged commit 7458651 into mui:master Sep 11, 2024
18 checks passed
@LukasTy LukasTy deleted the create-renovate-eslint-plugins-group branch September 11, 2024 11:31
@Janpot
Copy link
Member

Janpot commented Sep 11, 2024

And how do you deal with dependency bumping when eslint-plugin-react-compiler changes are very time consuming?

We don't have that plugin enabled by default.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
core Infrastructure work going on behind the scenes scope: code-infra Specific to the core-infra product
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants