Skip to content

Commit

Permalink
fix more rules
Browse files Browse the repository at this point in the history
  • Loading branch information
oliviertassinari committed Nov 23, 2024
1 parent 1b74b9e commit fa8ffd2
Show file tree
Hide file tree
Showing 11 changed files with 31 additions and 11 deletions.
1 change: 1 addition & 0 deletions docs/src/modules/components/ApiPage/list/ClassesList.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,7 @@ export default function ClassesList(props: ClassesListProps) {
{description && <p dangerouslySetInnerHTML={{ __html: description }} />}
{displayClassKeys && !isGlobal && (
<p className="prop-list-class">
{/* eslint-disable-next-line material-ui/no-hardcoded-labels */}
<span className="prop-list-title">{'Rule name'}:</span>
<code className="Api-code">{key}</code>
</p>
Expand Down
2 changes: 2 additions & 0 deletions docs/src/modules/components/ApiPage/list/PropertiesList.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -157,11 +157,13 @@ export default function PropertiesList(props: PropertiesListProps) {
<React.Fragment>
{propName}
{isProPlan && (
// eslint-disable-next-line material-ui/no-hardcoded-labels
<a href="/x/introduction/licensing/#pro-plan" aria-label="Pro plan">
<span className="plan-pro" />
</a>
)}
{isPremiumPlan && (
// eslint-disable-next-line material-ui/no-hardcoded-labels
<a href="/x/introduction/licensing/#premium-plan" aria-label="Premium plan">
<span className="plan-premium" />
</a>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,8 @@ export default function ToggleDisplayOption(props: ToggleDisplayOptionProps) {
sx={{ height: '1.875rem', p: '6px 4px 6px 8px', textTransform: 'capitalize' }}
>
<Box component="span" sx={{ fontWeight: 'medium', mr: 0.5 }}>
View:
{/* eslint-disable-next-line material-ui/no-hardcoded-labels */}
{'View:'}
</Box>
{displayOption}
</Button>
Expand All @@ -136,7 +137,8 @@ export default function ToggleDisplayOption(props: ToggleDisplayOptionProps) {
data-ga-event-action={sectionType}
data-ga-event-label="table"
>
Table
{/* eslint-disable-next-line material-ui/no-hardcoded-labels */}
{'Table'}
<CheckIcon
sx={{ fontSize: '0.85rem', ml: 'auto', opacity: displayOption === 'table' ? 1 : 0 }}
/>
Expand All @@ -149,7 +151,8 @@ export default function ToggleDisplayOption(props: ToggleDisplayOptionProps) {
data-ga-event-action={sectionType}
data-ga-event-label="expanded"
>
Expanded list
{/* eslint-disable-next-line material-ui/no-hardcoded-labels */}
{'Expanded list'}
<CheckIcon
sx={{ fontSize: '0.85rem', ml: 'auto', opacity: displayOption === 'expanded' ? 1 : 0 }}
/>
Expand All @@ -162,7 +165,8 @@ export default function ToggleDisplayOption(props: ToggleDisplayOptionProps) {
data-ga-event-action={sectionType}
data-ga-event-label="collapsed"
>
Collapsed list
{/* eslint-disable-next-line material-ui/no-hardcoded-labels */}
{'Collapsed list'}
<CheckIcon
sx={{ fontSize: '0.85rem', ml: 'auto', opacity: displayOption === 'collapsed' ? 1 : 0 }}
/>
Expand Down
8 changes: 5 additions & 3 deletions docs/src/modules/components/ApiPage/table/ClassesTable.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -65,9 +65,11 @@ export default function ClassesTable(props: ClassesTableProps) {
<StyledTable>
<thead>
<tr>
<th>Class name</th>
{displayClassKeys && <th>Rule name</th>}
<th>Description</th>
{/* eslint-disable material-ui/no-hardcoded-labels */}
<th>{'Class name'}</th>
{displayClassKeys && <th>{'Rule name'}</th>}
<th>{'Description'}</th>
{/* eslint-enable material-ui/no-hardcoded-labels */}
</tr>
</thead>
<tbody>
Expand Down
12 changes: 8 additions & 4 deletions docs/src/modules/components/ApiPage/table/PropertiesTable.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -133,10 +133,12 @@ export default function PropertiesTable(props: PropertiesTableProps) {
<StyledTable>
<thead>
<tr>
<th>Name</th>
<th>Type</th>
{hasDefaultColumn && <th>Default</th>}
<th>Description</th>
{/* eslint-disable material-ui/no-hardcoded-labels */}
<th>{'Name'}</th>
<th>{'Type'}</th>
{hasDefaultColumn && <th>{'Default'}</th>}
<th>{'Description'}</th>
{/* eslint-enable material-ui/no-hardcoded-labels */}
</tr>
</thead>
<tbody>
Expand Down Expand Up @@ -168,11 +170,13 @@ export default function PropertiesTable(props: PropertiesTableProps) {
{isRequired ? '*' : ''}
{isOptional ? '?' : ''}
{isProPlan && (
// eslint-disable-next-line material-ui/no-hardcoded-labels
<a href="/x/introduction/licensing/#pro-plan" aria-label="Pro plan">
<span className="plan-pro" />
</a>
)}
{isPremiumPlan && (
// eslint-disable-next-line material-ui/no-hardcoded-labels
<a href="/x/introduction/licensing/#premium-plan" aria-label="Premium plan">
<span className="plan-premium" />
</a>
Expand Down
1 change: 1 addition & 0 deletions docs/src/modules/components/ApiPage/table/SlotsTable.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,7 @@ export default function SlotsTable(props: SlotsTableProps) {
{name}
</td>
<td className="MuiApi-table-class-name">
{/* eslint-disable-next-line material-ui/no-hardcoded-labels */}
{className && <span className="class-name">{`.${className}`}</span>}
</td>
<td>{defaultValue && <code className="item-default">{defaultValue}</code>}</td>
Expand Down
1 change: 1 addition & 0 deletions docs/src/modules/components/JoyThemeBuilder.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
/* eslint-disable material-ui/no-hardcoded-labels */
import * as React from 'react';
import TypeScriptIcon from '@mui/docs/svgIcons/TypeScript';
import startCase from 'lodash/startCase';
Expand Down
1 change: 1 addition & 0 deletions docs/src/modules/components/JoyUsageDemo.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
/* eslint-disable material-ui/no-hardcoded-labels */
import * as React from 'react';
import Check from '@mui/icons-material/Check';
import CheckRounded from '@mui/icons-material/CheckRounded';
Expand Down
1 change: 1 addition & 0 deletions docs/src/modules/components/JoyVariablesDemo.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
/* eslint-disable material-ui/no-hardcoded-labels */
import * as React from 'react';
import Box from '@mui/joy/Box';
import Divider from '@mui/joy/Divider';
Expand Down
2 changes: 2 additions & 0 deletions docs/src/modules/components/MuiProductSelector.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -260,6 +260,7 @@ const MuiProductSelector = React.forwardRef(function MuiProductSelector(
},
}}
>
{/* eslint-disable-next-line material-ui/no-hardcoded-labels */}
<NavLabel>MUI X Components</NavLabel>
</Box>
{advancedProducts.map((product) => (
Expand Down Expand Up @@ -292,6 +293,7 @@ const MuiProductSelector = React.forwardRef(function MuiProductSelector(
}}
>
<Box sx={{ display: 'flex', alignItems: 'center', gap: '1px' }}>
{/* eslint-disable-next-line material-ui/no-hardcoded-labels */}
<NavLabel> Toolpad </NavLabel>
<Chip
label="Beta"
Expand Down
1 change: 1 addition & 0 deletions docs/src/modules/components/ThemeViewer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,7 @@ function ObjectEntryLabel(props: { objectKey: string; objectValue: any }) {

return (
<React.Fragment>
{/* eslint-disable-next-line material-ui/no-hardcoded-labels */}
{`${objectKey}: `}
{type === 'color' ? (
<Color style={{ borderColor: lighten(label, 0.7) }}>
Expand Down

0 comments on commit fa8ffd2

Please sign in to comment.