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] Apply top-level eslint rule to docs and fix violations #43126

Merged
merged 13 commits into from
Aug 7, 2024

Conversation

Janpot
Copy link
Member

@Janpot Janpot commented Jul 31, 2024

Following up on #43108 (review)

Also moving PaletteMode and Color to @mui/material/styles

@Janpot Janpot added the core Infrastructure work going on behind the scenes label Jul 31, 2024
@mui-bot
Copy link

mui-bot commented Jul 31, 2024

Netlify deploy preview

https://deploy-preview-43126--material-ui.netlify.app/

Bundle size report

No bundle size changes (Toolpad)
No bundle size changes

Generated by 🚫 dangerJS against fcc42e3

@@ -41,27 +41,9 @@ export type InternalStandardProps<
style?: React.CSSProperties;
};

export type PaletteMode = 'light' | 'dark';
Copy link
Member Author

@Janpot Janpot Jul 31, 2024

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

@Janpot Janpot marked this pull request as ready for review July 31, 2024 11:18
@Janpot Janpot requested a review from DiegoAndai August 7, 2024 03:53
@github-actions github-actions bot added the PR: out-of-date The pull request has merge conflicts and can't be merged label Aug 7, 2024
Copy link
Member

@DiegoAndai DiegoAndai left a 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 = [
Copy link
Member

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

Copy link
Member Author

@Janpot Janpot Aug 7, 2024

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?

Copy link
Member

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 😅

@github-actions github-actions bot removed the PR: out-of-date The pull request has merge conflicts and can't be merged label Aug 7, 2024
@Janpot Janpot merged commit 6ec0451 into mui:next Aug 7, 2024
22 checks passed
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.

3 participants