Skip to content

[code-infra] Avoid loading barrel file during type checking #46177

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

Merged
merged 5 commits into from
May 19, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -491,7 +491,7 @@ module.exports = /** @type {Config} */ ({
},
{
files: ['packages/*/src/**/*.?(c|m)[jt]s?(x)'],
excludedFiles: ['*.d.ts', '*.spec.*'],
excludedFiles: ['*.spec.*'],
rules: {
'no-restricted-imports': [
'error',
Expand Down
2 changes: 1 addition & 1 deletion packages/mui-lab/src/TabPanel/TabPanel.d.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import * as React from 'react';
import { InternalStandardProps as StandardProps } from '@mui/material';
import { InternalStandardProps as StandardProps } from '@mui/material/internal';
import { Theme } from '@mui/material/styles';
import { SxProps } from '@mui/system';
import { TabPanelClasses } from './tabPanelClasses';
Expand Down
3 changes: 1 addition & 2 deletions packages/mui-lab/src/Timeline/Timeline.types.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
// eslint-disable-next-line no-restricted-imports -- importing types
import { InternalStandardProps as StandardProps } from '@mui/material';
import { InternalStandardProps as StandardProps } from '@mui/material/internal';
import { Theme } from '@mui/material/styles';
import { SxProps } from '@mui/system';
import { TimelineClasses } from './timelineClasses';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import * as React from 'react';
import { InternalStandardProps as StandardProps } from '@mui/material';
import { InternalStandardProps as StandardProps } from '@mui/material/internal';
import { Theme } from '@mui/material/styles';
import { SxProps } from '@mui/system';
import { TimelineConnectorClasses } from './timelineConnectorClasses';
Expand Down
3 changes: 2 additions & 1 deletion packages/mui-lab/src/TimelineContent/TimelineContent.d.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
import * as React from 'react';
import { SxProps } from '@mui/system';
import { Theme } from '@mui/material/styles';
import { InternalStandardProps as StandardProps, TypographyProps } from '@mui/material';
import { TypographyProps } from '@mui/material/Typography';
import { InternalStandardProps as StandardProps } from '@mui/material/internal';
import { TimelineContentClasses } from './timelineContentClasses';

export interface TimelineContentProps extends StandardProps<TypographyProps> {
Expand Down
2 changes: 1 addition & 1 deletion packages/mui-lab/src/TimelineDot/TimelineDot.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import * as React from 'react';
import { OverridableStringUnion } from '@mui/types';
import { SxProps } from '@mui/system';
import { Theme } from '@mui/material/styles';
import { InternalStandardProps as StandardProps } from '@mui/material';
import { InternalStandardProps as StandardProps } from '@mui/material/internal';
import { TimelineDotClasses } from './timelineDotClasses';

export interface TimelineDotPropsVariantOverrides {}
Expand Down
2 changes: 1 addition & 1 deletion packages/mui-lab/src/TimelineItem/TimelineItem.d.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import * as React from 'react';
import { SxProps } from '@mui/system';
import { Theme } from '@mui/material/styles';
import { InternalStandardProps as StandardProps } from '@mui/material';
import { InternalStandardProps as StandardProps } from '@mui/material/internal';
import { TimelineItemClasses } from './timelineItemClasses';

export interface TimelineItemProps extends StandardProps<React.HTMLAttributes<HTMLDivElement>> {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
import * as React from 'react';
import { SxProps } from '@mui/system';
import { Theme } from '@mui/material/styles';
import { InternalStandardProps as StandardProps, TypographyProps } from '@mui/material';
import { TypographyProps } from '@mui/material/Typography';
import { InternalStandardProps as StandardProps } from '@mui/material/internal';
import { TimelineOppositeContentClasses } from './timelineOppositeContentClasses';

export interface TimelineOppositeContentProps extends StandardProps<TypographyProps> {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import * as React from 'react';
import { InternalStandardProps as StandardProps } from '@mui/material';
import { InternalStandardProps as StandardProps } from '@mui/material/internal';
import { Theme } from '@mui/material/styles';
import { SxProps } from '@mui/system';
import { TimelineSeparatorClasses } from './timelineSeparatorClasses';
Expand Down
2 changes: 1 addition & 1 deletion packages/mui-material/src/Accordion/Accordion.d.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import * as React from 'react';
import { SxProps } from '@mui/system';
import { Theme } from '..';
import { Theme } from '../styles';
import { TransitionProps } from '../transitions/transition';
import { AccordionClasses } from './accordionClasses';
import { OverridableComponent, OverrideProps } from '../OverridableComponent';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import * as React from 'react';
import { SxProps } from '@mui/system';
import { InternalStandardProps as StandardProps, Theme } from '..';
import { Theme } from '../styles';
import { InternalStandardProps as StandardProps } from '../internal';
import { AccordionActionsClasses } from './accordionActionsClasses';

export interface AccordionActionsProps extends StandardProps<React.HTMLAttributes<HTMLDivElement>> {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import * as React from 'react';
import { SxProps } from '@mui/system';
import { InternalStandardProps as StandardProps, Theme } from '..';
import { Theme } from '../styles';
import { InternalStandardProps as StandardProps } from '../internal';
import { AccordionDetailsClasses } from './accordionDetailsClasses';

export interface AccordionDetailsProps extends StandardProps<React.HTMLAttributes<HTMLDivElement>> {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@ import * as React from 'react';
import { SxProps } from '@mui/system';
import { ButtonBaseProps, ExtendButtonBase, ExtendButtonBaseTypeMap } from '../ButtonBase';
import { OverrideProps } from '../OverridableComponent';
import { CreateSlotsAndSlotProps, SlotProps, Theme } from '..';
import { CreateSlotsAndSlotProps, SlotProps } from '../utils/types';
import { Theme } from '../styles';
import { AccordionSummaryClasses } from './accordionSummaryClasses';

export interface AccordionSummarySlots {
Expand Down
5 changes: 4 additions & 1 deletion packages/mui-material/src/Alert/Alert.d.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
import * as React from 'react';
import { OverridableStringUnion } from '@mui/types';
import { SxProps } from '@mui/system';
import { IconButtonProps, InternalStandardProps as StandardProps, SvgIconProps, Theme } from '..';
import { SvgIconProps } from '../SvgIcon';
import { Theme } from '../styles';
import { InternalStandardProps as StandardProps } from '../internal';
import { IconButtonProps } from '../IconButton';
import { PaperProps } from '../Paper';
import { AlertClasses } from './alertClasses';
import { CreateSlotsAndSlotProps, SlotProps } from '../utils/types';
Expand Down
3 changes: 2 additions & 1 deletion packages/mui-material/src/AlertTitle/AlertTitle.d.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import * as React from 'react';
import { SxProps } from '@mui/system';
import { Theme, TypographyProps } from '..';
import { Theme } from '../styles';
import { TypographyProps } from '../Typography';
import { AlertTitleClasses } from './alertTitleClasses';

export interface AlertTitleProps extends TypographyProps<'div'> {
Expand Down
2 changes: 1 addition & 1 deletion packages/mui-material/src/AppBar/AppBar.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import * as React from 'react';
import { SxProps } from '@mui/system';
import { OverridableStringUnion } from '@mui/types';
import { OverridableComponent, OverrideProps } from '../OverridableComponent';
import { PropTypes, Theme } from '..';
import { PropTypes, Theme } from '../styles';
import { AppBarClasses } from './appBarClasses';
import { ExtendPaperTypeMap } from '../Paper/Paper';

Expand Down
4 changes: 3 additions & 1 deletion packages/mui-material/src/Autocomplete/Autocomplete.d.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
import * as React from 'react';
import { SxProps } from '@mui/system';
import { OverridableStringUnion } from '@mui/types';
import { IconButtonProps, InternalStandardProps as StandardProps, Theme } from '@mui/material';
import { Theme } from '../styles';
import { InternalStandardProps as StandardProps } from '../internal';
import { IconButtonProps } from '../IconButton';
import { ChipProps, ChipTypeMap } from '../Chip';
import { PaperProps } from '../Paper';
import { PopperProps } from '../Popper';
Expand Down
2 changes: 1 addition & 1 deletion packages/mui-material/src/AvatarGroup/AvatarGroup.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import {
PartiallyRequired,
} from '@mui/types';
import { SxProps } from '@mui/system';
import { Theme } from '@mui/material';
import { Theme } from '../styles';
import { AvatarGroupClasses } from './avatarGroupClasses';
import Avatar from '../Avatar';
import { CreateSlotsAndSlotProps, SlotProps } from '../utils/types';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import * as React from 'react';
import { SxProps } from '@mui/system';
import { Theme } from '..';
import { Theme } from '../styles';
import { OverridableComponent, OverrideProps } from '../OverridableComponent';
import { BottomNavigationClasses } from './bottomNavigationClasses';

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import * as React from 'react';
import { SxProps } from '@mui/system';
import { CreateSlotsAndSlotProps, SlotProps, Theme } from '..';
import { CreateSlotsAndSlotProps, SlotProps } from '../utils/types';
import { Theme } from '../styles';
import {
ButtonBaseProps,
ButtonBaseTypeMap,
Expand Down
2 changes: 1 addition & 1 deletion packages/mui-material/src/ButtonBase/TouchRipple.d.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import * as React from 'react';
import { InternalStandardProps as StandardProps } from '..';
import { InternalStandardProps as StandardProps } from '../internal';
import { TouchRippleClasses, TouchRippleClassKey } from './touchRippleClasses';

export { TouchRippleClassKey };
Expand Down
2 changes: 1 addition & 1 deletion packages/mui-material/src/ButtonGroup/ButtonGroup.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import * as React from 'react';
import { SxProps } from '@mui/system';
import { OverridableStringUnion } from '@mui/types';
import { OverridableComponent, OverrideProps } from '../OverridableComponent';
import { Theme } from '..';
import { Theme } from '../styles';
import { ButtonGroupClasses } from './buttonGroupClasses';

export interface ButtonGroupPropsColorOverrides {}
Expand Down
2 changes: 1 addition & 1 deletion packages/mui-material/src/Card/Card.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import * as React from 'react';
import { SxProps } from '@mui/system';
import { DistributiveOmit } from '@mui/types';
import { OverridableComponent, OverrideProps } from '../OverridableComponent';
import { Theme } from '..';
import { Theme } from '../styles';
import { PaperOwnProps } from '../Paper';
import { CardClasses } from './cardClasses';

Expand Down
3 changes: 2 additions & 1 deletion packages/mui-material/src/CardActionArea/CardActionArea.d.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import * as React from 'react';
import { SxProps } from '@mui/system';
import { SlotProps, CreateSlotsAndSlotProps, Theme } from '..';
import { SlotProps, CreateSlotsAndSlotProps } from '../utils/types';
import { Theme } from '../styles';
import {
ButtonBaseProps,
ButtonBaseTypeMap,
Expand Down
3 changes: 2 additions & 1 deletion packages/mui-material/src/CardActions/CardActions.d.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import * as React from 'react';
import { SxProps } from '@mui/system';
import { InternalStandardProps as StandardProps, Theme } from '..';
import { Theme } from '../styles';
import { InternalStandardProps as StandardProps } from '../internal';
import { CardActionsClasses } from './cardActionsClasses';

export interface CardActionsProps extends StandardProps<React.HTMLAttributes<HTMLDivElement>> {
Expand Down
2 changes: 1 addition & 1 deletion packages/mui-material/src/CardContent/CardContent.d.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import * as React from 'react';
import { SxProps } from '@mui/system';
import { OverridableComponent, OverrideProps } from '../OverridableComponent';
import { Theme } from '..';
import { Theme } from '../styles';
import { CardContentClasses } from './cardContentClasses';

export interface CardContentOwnProps {
Expand Down
2 changes: 1 addition & 1 deletion packages/mui-material/src/CardHeader/CardHeader.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import * as React from 'react';
import { SxProps } from '@mui/system';
import { TypographyProps } from '../Typography';
import { OverridableComponent, OverrideProps } from '../OverridableComponent';
import { Theme } from '..';
import { Theme } from '../styles';
import { CreateSlotsAndSlotProps, SlotProps } from '../utils/types';
import { CardHeaderClasses } from './cardHeaderClasses';

Expand Down
2 changes: 1 addition & 1 deletion packages/mui-material/src/CardMedia/CardMedia.d.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import * as React from 'react';
import { SxProps } from '@mui/system';
import { Theme } from '..';
import { Theme } from '../styles';
import { OverridableComponent, OverrideProps } from '../OverridableComponent';
import { CardMediaClasses } from './cardMediaClasses';

Expand Down
3 changes: 2 additions & 1 deletion packages/mui-material/src/Checkbox/Checkbox.d.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
import * as React from 'react';
import { SxProps } from '@mui/system';
import { OverridableStringUnion } from '@mui/types';
import { InternalStandardProps as StandardProps, Theme } from '..';
import { Theme } from '../styles';
import { InternalStandardProps as StandardProps } from '../internal';
import { CreateSlotsAndSlotProps, SlotProps } from '../utils/types';
import { SwitchBaseProps } from '../internal/SwitchBase';
import { CheckboxClasses } from './checkboxClasses';
Expand Down
2 changes: 1 addition & 1 deletion packages/mui-material/src/Chip/Chip.d.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import * as React from 'react';
import { OverridableStringUnion } from '@mui/types';
import { SxProps } from '@mui/system';
import { Theme } from '..';
import { Theme } from '../styles';
import { OverridableComponent, OverrideProps } from '../OverridableComponent';
import { ChipClasses } from './chipClasses';

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
import * as React from 'react';
import { SxProps } from '@mui/system';
import { OverridableStringUnion } from '@mui/types';
import { InternalStandardProps as StandardProps, Theme } from '..';
import { Theme } from '../styles';
import { InternalStandardProps as StandardProps } from '../internal';
import { CircularProgressClasses } from './circularProgressClasses';

export interface CircularProgressPropsColorOverrides {}
Expand Down
3 changes: 2 additions & 1 deletion packages/mui-material/src/Collapse/Collapse.d.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import * as React from 'react';
import { SxProps } from '@mui/system';
import { InternalStandardProps as StandardProps, Theme } from '..';
import { Theme } from '../styles';
import { InternalStandardProps as StandardProps } from '../internal';
import { TransitionProps } from '../transitions/transition';
import { CollapseClasses } from './collapseClasses';

Expand Down
3 changes: 2 additions & 1 deletion packages/mui-material/src/Dialog/Dialog.d.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import * as React from 'react';
import { SxProps, Breakpoint } from '@mui/system';
import { InternalStandardProps as StandardProps, Theme } from '..';
import { Theme } from '../styles';
import { InternalStandardProps as StandardProps } from '../internal';
import { BackdropProps } from '../Backdrop';
import { PaperProps } from '../Paper';
import { ModalProps } from '../Modal';
Expand Down
3 changes: 2 additions & 1 deletion packages/mui-material/src/DialogActions/DialogActions.d.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import * as React from 'react';
import { SxProps } from '@mui/system';
import { InternalStandardProps as StandardProps, Theme } from '..';
import { Theme } from '../styles';
import { InternalStandardProps as StandardProps } from '../internal';
import { DialogActionsClasses } from './dialogActionsClasses';

export interface DialogActionsProps extends StandardProps<React.HTMLAttributes<HTMLDivElement>> {
Expand Down
3 changes: 2 additions & 1 deletion packages/mui-material/src/DialogContent/DialogContent.d.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import * as React from 'react';
import { SxProps } from '@mui/system';
import { InternalStandardProps as StandardProps, Theme } from '..';
import { Theme } from '../styles';
import { InternalStandardProps as StandardProps } from '../internal';
import { DialogContentClasses } from './dialogContentClasses';

export interface DialogContentProps extends StandardProps<React.HTMLAttributes<HTMLDivElement>> {
Expand Down
2 changes: 1 addition & 1 deletion packages/mui-material/src/Divider/Divider.d.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import * as React from 'react';
import { OverridableStringUnion } from '@mui/types';
import { SxProps } from '@mui/system';
import { Theme } from '..';
import { Theme } from '../styles';
import { OverridableComponent, OverrideProps } from '../OverridableComponent';
import { DividerClasses } from './dividerClasses';

Expand Down
3 changes: 2 additions & 1 deletion packages/mui-material/src/Drawer/Drawer.d.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import * as React from 'react';
import { SxProps } from '@mui/system';
import { InternalStandardProps as StandardProps, Theme } from '..';
import { Theme } from '../styles';
import { InternalStandardProps as StandardProps } from '../internal';
import { CreateSlotsAndSlotProps, SlotProps } from '../utils/types';
import { ModalProps } from '../Modal';
import { BackdropProps } from '../Backdrop';
Expand Down
2 changes: 1 addition & 1 deletion packages/mui-material/src/Fab/Fab.d.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import * as React from 'react';
import { OverridableStringUnion } from '@mui/types';
import { SxProps } from '@mui/system';
import { PropTypes, Theme } from '..';
import { PropTypes, Theme } from '../styles';
import { ExtendButtonBase, ExtendButtonBaseTypeMap } from '../ButtonBase';
import { OverrideProps } from '../OverridableComponent';
import { FabClasses } from './fabClasses';
Expand Down
3 changes: 2 additions & 1 deletion packages/mui-material/src/FilledInput/FilledInput.d.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import { SxProps } from '@mui/system';
import { InternalStandardProps as StandardProps, Theme } from '..';
import { Theme } from '../styles';
import { InternalStandardProps as StandardProps } from '../internal';
import { InputBaseProps } from '../InputBase';
import { FilledInputClasses } from './filledInputClasses';

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import * as React from 'react';
import { SxProps } from '@mui/system';
import { Theme, InternalStandardProps as StandardProps } from '..';
import { Theme } from '../styles';
import { InternalStandardProps as StandardProps } from '../internal';
import Typography, { TypographyProps } from '../Typography';
import { FormControlLabelClasses } from './formControlLabelClasses';
import { CreateSlotsAndSlotProps, SlotProps } from '../utils/types';
Expand Down
3 changes: 2 additions & 1 deletion packages/mui-material/src/FormGroup/FormGroup.d.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import * as React from 'react';
import { SxProps } from '@mui/system';
import { InternalStandardProps as StandardProps, Theme } from '..';
import { Theme } from '../styles';
import { InternalStandardProps as StandardProps } from '../internal';
import { FormGroupClasses } from './formGroupClasses';

export interface FormGroupProps extends StandardProps<React.HTMLAttributes<HTMLDivElement>> {
Expand Down
2 changes: 1 addition & 1 deletion packages/mui-material/src/IconButton/IconButton.d.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import * as React from 'react';
import { SxProps } from '@mui/system';
import { OverridableStringUnion } from '@mui/types';
import { Theme } from '..';
import { Theme } from '../styles';
import { ExtendButtonBase, ExtendButtonBaseTypeMap } from '../ButtonBase';
import { OverrideProps } from '../OverridableComponent';
import { IconButtonClasses } from './iconButtonClasses';
Expand Down
2 changes: 1 addition & 1 deletion packages/mui-material/src/ImageList/ImageList.d.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import * as React from 'react';
import { SxProps } from '@mui/system';
import { OverridableStringUnion } from '@mui/types';
import { Theme } from '..';
import { Theme } from '../styles';
import { OverridableComponent, OverrideProps } from '../OverridableComponent';
import { ImageListClasses } from './imageListClasses';

Expand Down
2 changes: 1 addition & 1 deletion packages/mui-material/src/ImageListItem/ImageListItem.d.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import * as React from 'react';
import { SxProps } from '@mui/system';
import { Theme } from '..';
import { Theme } from '../styles';
import { OverridableComponent, OverrideProps } from '../OverridableComponent';
import { ImageListItemClasses } from './imageListItemClasses';

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import * as React from 'react';
import { SxProps } from '@mui/system';
import { InternalStandardProps as StandardProps, Theme } from '..';
import { Theme } from '../styles';
import { InternalStandardProps as StandardProps } from '../internal';
import { ImageListItemBarClasses } from './imageListItemBarClasses';

export interface ImageListItemBarProps
Expand Down
Loading
Loading