Skip to content
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
11 changes: 1 addition & 10 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -446,16 +446,7 @@ module.exports = {
files: ['packages/*/src/**/*{.ts,.tsx,.js}'],
excludedFiles: ['*.d.ts', '*.spec.ts', '*.spec.tsx', 'packages/mui-joy/**/*{.ts,.tsx,.js}'],
rules: {
'material-ui/mui-name-matches-component-name': [
'error',
{
customHooks: [
'useDatePickerDefaultizedProps',
'useDateTimePickerDefaultizedProps',
'useTimePickerDefaultizedProps',
],
},
],
'material-ui/mui-name-matches-component-name': 'error',
},
},
{
Expand Down
5 changes: 5 additions & 0 deletions packages/eslint-plugin-material-ui/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ Custom eslint rules for MUI.

- `disallow-active-element-as-key-event-target`
- `docgen-ignore-before-comment`
- `mui-name-matches-component-name`
- `no-hardcoded-labels`
- `rules-of-use-theme-variants`
- ~~`restricted-path-imports`~~
Expand All @@ -20,6 +21,10 @@ we use already verifies that the passed target can be the target of a

Enforce correct usage of `@ignore` in the prop-types block comments.

### mui-name-matches-component-name

Enforce that the name passed to the `useThemeProps` and `useDefaultProps` hooks matches the component name.

### no-hardcoded-labels

Prevent the usage of hardcoded labels.
Expand Down