-
-
Notifications
You must be signed in to change notification settings - Fork 32.5k
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] Apply top-level eslint rule to docs and fix violations #43126
Conversation
Netlify deploy previewhttps://deploy-preview-43126--material-ui.netlify.app/ Bundle size report |
@@ -41,27 +41,9 @@ export type InternalStandardProps< | |||
style?: React.CSSProperties; | |||
}; | |||
|
|||
export type PaletteMode = 'light' | 'dark'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This file has a
export * from './styles';
So moving it there shouldn't affect public API
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @Janpot!
Only one request 😊
@@ -13,6 +13,32 @@ const forbidCreateStylesMessage = | |||
|
|||
const ENABLE_REACT_COMPILER_PLUGIN = false; | |||
|
|||
const NO_RESTRICTED_IMPORTS_PATHS_TOP_LEVEL_PACKAGES = [ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should include @mui/system
as well
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That generates 486 new eslint warnings. Are you sure we intend to discourage top-level imports from this package? This PR essentially fixes the initial rule to apply to the docs again, which appeared to have been accidentally broken.
If we want to introduce the same behavior for @mui/system
, perhaps it makes sense to do it separately? it's potentially also a task the community could take on?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Makes sense, I didn't know it would introduce that many warnings 😅
Following up on #43108 (review)
Also moving
PaletteMode
andColor
to@mui/material/styles