Skip to content

[charts] Fix eslint for react compiler#13444

Merged
alexfauquette merged 2 commits into
mui:masterfrom
alexfauquette:fix-eslint
Jun 13, 2024
Merged

[charts] Fix eslint for react compiler#13444
alexfauquette merged 2 commits into
mui:masterfrom
alexfauquette:fix-eslint

Conversation

@alexfauquette

@alexfauquette alexfauquette commented Jun 11, 2024

Copy link
Copy Markdown
Member

Not sure it's the best way to fix warnings about no side effect, but it works 😇

@alexfauquette alexfauquette added the scope: charts Changes related to the charts. label Jun 11, 2024
@mui-bot

mui-bot commented Jun 11, 2024

Copy link
Copy Markdown

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

Generated by 🚫 dangerJS against 117d0b9

@alexfauquette alexfauquette requested a review from JCQuintas June 11, 2024 13:59

@JCQuintas JCQuintas left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Smart move changing the warnedOnce into the closure 👍

@@ -0,0 +1,17 @@
export function buildWarning(

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I would probably just rename it to buildOneTimeWarning or buildWarningOnce

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

It's a common piece of code we duplicate in each package.

Was introduced mostly to avoid code duplication in the data grid. We could do the renaming but in that case, would require to do it in all packages

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

up to you, doesn't matter much 😅

should we eventually have a shared X package? shouldn't be too hard to accomplish

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

should we eventually have a shared X package?

This has been discussed quite recently
I feel like we are only waiting for a use-case and someone to own the creation of the new package 😆

@joserodolfofreitas @cherniavskii if you are OK, we can create it

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Agreed, we need a shared utils package 👍🏻

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

scope: charts Changes related to the charts.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants