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

[core] Auto-fix upcoming eslint issues #34644

Merged
merged 7 commits into from
Oct 11, 2022
Merged

[core] Auto-fix upcoming eslint issues #34644

merged 7 commits into from
Oct 11, 2022

Conversation

Janpot
Copy link
Member

@Janpot Janpot commented Oct 6, 2022

Running yarn lint --fix on #34642 without upgrading eslint

To reviewers: recommended to hide whitespace to drastically reduce the line count

edit:

this messes with the tooltip in the demos:

@Janpot Janpot added the core Infrastructure work going on behind the scenes label Oct 6, 2022
@mui-bot
Copy link

mui-bot commented Oct 6, 2022

Details of bundle changes

Generated by 🚫 dangerJS against c49770d

@oliviertassinari

This comment was marked as resolved.

@Janpot

This comment was marked as resolved.

@Janpot Janpot marked this pull request as ready for review October 7, 2022 16:15
@Janpot
Copy link
Member Author

Janpot commented Oct 10, 2022

@michaldudak Since this is a large PR, I'm specifically calling attention to the removal of fragment in the base demo: https://github.com/mui/material-ui/pull/34644/files#diff-036fe9f47ed568c74dc41779902387e3faf8b49a20818792e906da08a91f84e3L9. Just in case it's there for a reason

@michaldudak
Copy link
Member

@Janpot it seems that the demo works correctly after your change.

I'm wondering, what's the rationale for disallowing components as lambdas?

@Janpot
Copy link
Member Author

Janpot commented Oct 11, 2022

@michaldudak airbnb/javascript#2505 (comment)

I also remember it at some point to be a requirement for react-refresh to work correctly in Next.js, though I can't immediately find it back.

Copy link
Member

@michaldudak michaldudak left a comment

Choose a reason for hiding this comment

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

Looks good to me now!

Copy link
Member

@oliviertassinari oliviertassinari left a comment

Choose a reason for hiding this comment

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

Great :)

@Janpot Janpot merged commit f27694b into mui:master Oct 11, 2022
@Janpot Janpot deleted the auto-fix branch October 11, 2022 11:35
@Janpot
Copy link
Member Author

Janpot commented Oct 11, 2022

@michaldudak Just stumbled upon it while looking for something else: https://nextjs.org/docs/basic-features/fast-refresh#limitations

Anonymous arrow functions like export default () => <div />; cause Fast Refresh to not preserve local component state. For large codebases you can use our name-default-component codemod.

@michaldudak
Copy link
Member

Always good to learn something new, thanks!

@oliviertassinari
Copy link
Member

@m4theushw A heads up, the eslint configuration is going to change. If we could apply the same auto-fix cases in MUI X, it would be great.

alexfauquette pushed a commit to alexfauquette/material-ui that referenced this pull request Oct 14, 2022
daniel-rabe pushed a commit to daniel-rabe/material-ui that referenced this pull request Nov 29, 2022
feliperli pushed a commit to jesrodri/material-ui that referenced this pull request Dec 6, 2022
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
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants