-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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] Refactor ESLint config to disallow root level imports #13130
Conversation
Deploy preview: https://deploy-preview-13130--material-ui-x.netlify.app/ |
It impacts charts docs a lot, hence, I've asked for a review from @alexfauquette and @JCQuintas. 😉 |
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.
Looks good for charts 👍
import { PaperProps as MuiPaperProps } from '@mui/material/Paper'; | ||
import { TransitionProps as MuiTransitionProps } from '@mui/material/transitions'; |
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.
These are almost a "bugfix". 🙈
...buildPackageRestrictedImports('@mui/x-date-pickers', 'x-date-pickers', false), | ||
...buildPackageRestrictedImports('@mui/x-date-pickers-pro', 'x-date-pickers-pro', false), |
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.
Notice the package name and path fixes - technically ESLint was not working on Pickers 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.
🤩 That's awesome
Follow-up on #13120.
@mui/x-codemod
to ESLIntno-restricted-imports
ruleno-restricted-imports
rule config for@mui/x-date-pickers*
packages <-- did not work nowno-restricted-imports
rule config to disallow root level package imports@mui/x-data-grid*
and@mui/x-license
packagesUseDateRangeFieldProps
from@mui/x-date-pickers-pro/models
to avoid the need for public root importLocalizationProvider
from@mui/x-date-pickers-pro/LocalizationProvider
to avoid the need for public root import