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] Restrict import path with ESLint #41970

Merged
merged 2 commits into from May 1, 2024

Conversation

oliviertassinari
Copy link
Member

@oliviertassinari oliviertassinari commented Apr 19, 2024

@oliviertassinari oliviertassinari added the core Infrastructure work going on behind the scenes label Apr 19, 2024
@mui-bot
Copy link

mui-bot commented Apr 19, 2024

Netlify deploy preview

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

Bundle size report

No bundle size changes (Toolpad)
No bundle size changes

Generated by 🚫 dangerJS against 7a8175d

'@base_ui/*/*/*',
// Allow any import depth with any internal packages
'!@mui/internal-*/**',
'!@mui/docs/**',
Copy link
Member Author

Choose a reason for hiding this comment

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

We should rename this one to @mui/internal-docs. @mui/docs was exporting public packages, it's not the case anymore.

@Janpot
Copy link
Member

Janpot commented Apr 22, 2024

I suspect that our move to the exports field in package json will make this rule largely irrelevant. When those deep imports simply don't exist anymore in the world of typescript. And consequently vscode won't suggest it anymore neither in its auto-import.

@oliviertassinari
Copy link
Member Author

oliviertassinari commented Apr 22, 2024

Oh yes, this will be great once we have package.json exports 🙌. We will need to fix the violations we have in the codebase to get there. I think rule will help us get there, e.g. If MUI X relies on private modules, best to caught it before we break them 😁

@Janpot
Copy link
Member

Janpot commented Apr 22, 2024

Yes, we decided to test more integrations before merging and we're running into a few issues. e.g. I suspect this one will be a blocker vercel/next.js#64796.

@oliviertassinari oliviertassinari merged commit 5b31379 into mui:next May 1, 2024
22 checks passed
@oliviertassinari oliviertassinari deleted the restrict-import-path branch May 1, 2024 15:11
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.

None yet

3 participants