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

Bump eslint-plugin-primer-react to v5.0.0 #4592

Closed
wants to merge 7 commits into from
Closed
Show file tree
Hide file tree
Changes from 6 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: 0 additions & 2 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,6 @@ module.exports = {
allow: ['dark_dimmed'],
},
],
'primer-react/no-deprecated-colors': ['warn', {checkAllStrings: true}],

// Overrides from updating plugin:github
'filenames/match-regex': 'off',
Expand Down Expand Up @@ -237,7 +236,6 @@ module.exports = {
'jsx-a11y/label-has-for': 'off',
'@typescript-eslint/no-unnecessary-condition': 'off',
'@typescript-eslint/no-unused-vars': 'off',
'primer-react/no-deprecated-colors': ['error', {skipImportCheck: true}],
'no-redeclare': 'off',
'ssr-friendly/no-dom-globals-in-module-scope': 'off',
'ssr-friendly/no-dom-globals-in-react-fc': 'off',
Expand Down
6 changes: 4 additions & 2 deletions docs/content/ActionMenu.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,8 @@ You can choose to have a different _anchor_ for the Menu depending on the applic

<ActionMenu.Overlay>
<ActionList showDividers>
<ActionList.Group title="Live query">
<ActionList.Group>
<ActionList.GroupHeading>Live query</ActionList.GroupHeading>
<ActionList.Item>
<ActionList.LeadingVisual>
<SearchIcon />
Expand All @@ -130,7 +131,8 @@ You can choose to have a different _anchor_ for the Menu depending on the applic
</ActionList.Item>
</ActionList.Group>
<ActionList.Divider />
<ActionList.Group title="Layout" variant="subtle">
<ActionList.Group variant="subtle">
<ActionList.GroupHeading>Layout</ActionList.GroupHeading>
<ActionList.Item>
<ActionList.LeadingVisual>
<NoteIcon />
Expand Down
20 changes: 10 additions & 10 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@
"eslint-plugin-mdx": "3.0.0",
"eslint-plugin-playwright": "0.15.1",
"eslint-plugin-prettier": "5.0.0",
"eslint-plugin-primer-react": "4.0.2",
"eslint-plugin-primer-react": "^5.0.0",
"eslint-plugin-react": "7.32.2",
"eslint-plugin-react-hooks": "4.6.0",
"eslint-plugin-ssr-friendly": "1.2.0",
Expand Down
2 changes: 2 additions & 0 deletions packages/react/src/ActionList/ActionList.dev.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ export const GroupWithSubtleTitleOldAPI = () => {
under features.
</p>
<ActionList selectionVariant="multiple" role="menu" showDividers aria-label="Reviewers">
{/* eslint-disable-next-line primer-react/no-deprecated-props */}
<ActionList.Group title="Everyone">
{users.slice(2).map(user => (
<ActionList.Item
Expand Down Expand Up @@ -80,6 +81,7 @@ export const GroupWithFilledTitleOldAPI = () => {
under features.
</p>
<ActionList selectionVariant="multiple" role="menu" showDividers aria-label="Reviewers">
{/* eslint-disable-next-line primer-react/no-deprecated-props */}
<ActionList.Group title="Everyone" variant="filled">
{users.slice(2).map(user => (
<ActionList.Item
Expand Down
2 changes: 1 addition & 1 deletion packages/react/src/ActionList/Item.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ export const Item = React.forwardRef<HTMLLIElement, ActionListItemProps>(
cursor: 'not-allowed',
'[data-component="ActionList.Checkbox"]': {
cursor: 'not-allowed',
bg: selected ? 'fg.muted' : 'var(--color-input-disabled-bg, rgba(175, 184, 193, 0.2))',
bg: selected ? 'fg.muted' : 'var(--control-bgColor-disabled, rgba(175, 184, 193, 0.2))',
borderColor: selected ? 'fg.muted' : 'var(--color-input-disabled-bg, rgba(175, 184, 193, 0.2))',
},
},
Expand Down
3 changes: 2 additions & 1 deletion packages/react/src/NavList/NavList.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -259,7 +259,8 @@ const Group: React.FC<NavListGroupProps> = ({title, children, sx: sxProp = defau
<>
{/* Hide divider if the group is the first item in the list */}
<ActionList.Divider sx={{'&:first-child': {display: 'none'}}} />
<ActionList.Group {...props} title={title} sx={sxProp}>
<ActionList.Group {...props} sx={sxProp}>
<ActionList.GroupHeading as="h3">{title}</ActionList.GroupHeading>
broccolinisoup marked this conversation as resolved.
Show resolved Hide resolved
{children}
</ActionList.Group>
</>
Expand Down
16 changes: 8 additions & 8 deletions packages/react/src/NavList/__snapshots__/NavList.test.tsx.snap
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ exports[`NavList renders a simple list 1`] = `
.c2[aria-disabled] [data-component="ActionList.Checkbox"],
.c2[data-inactive] [data-component="ActionList.Checkbox"] {
cursor: not-allowed;
background-color: var(--color-input-disabled-bg,rgba(175,184,193,0.2));
background-color: var(--control-bgColor-disabled,rgba(175,184,193,0.2));
border-color: var(--color-input-disabled-bg,rgba(175,184,193,0.2));
}

Expand Down Expand Up @@ -172,7 +172,7 @@ exports[`NavList renders a simple list 1`] = `
.c7[aria-disabled] [data-component="ActionList.Checkbox"],
.c7[data-inactive] [data-component="ActionList.Checkbox"] {
cursor: not-allowed;
background-color: var(--color-input-disabled-bg,rgba(175,184,193,0.2));
background-color: var(--control-bgColor-disabled,rgba(175,184,193,0.2));
border-color: var(--color-input-disabled-bg,rgba(175,184,193,0.2));
}

Expand Down Expand Up @@ -523,7 +523,7 @@ exports[`NavList renders with groups 1`] = `
.c6[aria-disabled] [data-component="ActionList.Checkbox"],
.c6[data-inactive] [data-component="ActionList.Checkbox"] {
cursor: not-allowed;
background-color: var(--color-input-disabled-bg,rgba(175,184,193,0.2));
background-color: var(--control-bgColor-disabled,rgba(175,184,193,0.2));
border-color: var(--color-input-disabled-bg,rgba(175,184,193,0.2));
}

Expand Down Expand Up @@ -612,7 +612,7 @@ exports[`NavList renders with groups 1`] = `
.c11[aria-disabled] [data-component="ActionList.Checkbox"],
.c11[data-inactive] [data-component="ActionList.Checkbox"] {
cursor: not-allowed;
background-color: var(--color-input-disabled-bg,rgba(175,184,193,0.2));
background-color: var(--control-bgColor-disabled,rgba(175,184,193,0.2));
border-color: var(--color-input-disabled-bg,rgba(175,184,193,0.2));
}

Expand Down Expand Up @@ -994,7 +994,7 @@ exports[`NavList.Item with NavList.SubNav does not have active styles if SubNav
.c11[aria-disabled] [data-component="ActionList.Checkbox"],
.c11[data-inactive] [data-component="ActionList.Checkbox"] {
cursor: not-allowed;
background-color: var(--color-input-disabled-bg,rgba(175,184,193,0.2));
background-color: var(--control-bgColor-disabled,rgba(175,184,193,0.2));
border-color: var(--color-input-disabled-bg,rgba(175,184,193,0.2));
}

Expand Down Expand Up @@ -1083,7 +1083,7 @@ exports[`NavList.Item with NavList.SubNav does not have active styles if SubNav
.c4[aria-disabled] [data-component="ActionList.Checkbox"],
.c4[data-inactive] [data-component="ActionList.Checkbox"] {
cursor: not-allowed;
background-color: var(--color-input-disabled-bg,rgba(175,184,193,0.2));
background-color: var(--control-bgColor-disabled,rgba(175,184,193,0.2));
border-color: var(--color-input-disabled-bg,rgba(175,184,193,0.2));
}

Expand Down Expand Up @@ -1458,7 +1458,7 @@ exports[`NavList.Item with NavList.SubNav has active styles if SubNav contains t
.c11[aria-disabled] [data-component="ActionList.Checkbox"],
.c11[data-inactive] [data-component="ActionList.Checkbox"] {
cursor: not-allowed;
background-color: var(--color-input-disabled-bg,rgba(175,184,193,0.2));
background-color: var(--control-bgColor-disabled,rgba(175,184,193,0.2));
border-color: var(--color-input-disabled-bg,rgba(175,184,193,0.2));
}

Expand Down Expand Up @@ -1557,7 +1557,7 @@ exports[`NavList.Item with NavList.SubNav has active styles if SubNav contains t
.c4[aria-disabled] [data-component="ActionList.Checkbox"],
.c4[data-inactive] [data-component="ActionList.Checkbox"] {
cursor: not-allowed;
background-color: var(--color-input-disabled-bg,rgba(175,184,193,0.2));
background-color: var(--control-bgColor-disabled,rgba(175,184,193,0.2));
border-color: var(--color-input-disabled-bg,rgba(175,184,193,0.2));
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -717,7 +717,7 @@ exports[`snapshots renders a menu that contains an item to add to the menu 1`] =
.c3[aria-disabled] [data-component="ActionList.Checkbox"],
.c3[data-inactive] [data-component="ActionList.Checkbox"] {
cursor: not-allowed;
background-color: var(--color-input-disabled-bg,rgba(175,184,193,0.2));
background-color: var(--control-bgColor-disabled,rgba(175,184,193,0.2));
border-color: var(--color-input-disabled-bg,rgba(175,184,193,0.2));
}

Expand Down Expand Up @@ -1490,7 +1490,7 @@ exports[`snapshots renders a multiselect input 1`] = `
.c3[aria-disabled] [data-component="ActionList.Checkbox"],
.c3[data-inactive] [data-component="ActionList.Checkbox"] {
cursor: not-allowed;
background-color: var(--color-input-disabled-bg,rgba(175,184,193,0.2));
background-color: var(--control-bgColor-disabled,rgba(175,184,193,0.2));
border-color: var(--color-input-disabled-bg,rgba(175,184,193,0.2));
}

Expand Down Expand Up @@ -2313,7 +2313,7 @@ exports[`snapshots renders a multiselect input with selected menu items 1`] = `
.c8[aria-disabled] [data-component="ActionList.Checkbox"],
.c8[data-inactive] [data-component="ActionList.Checkbox"] {
cursor: not-allowed;
background-color: var(--color-input-disabled-bg,rgba(175,184,193,0.2));
background-color: var(--control-bgColor-disabled,rgba(175,184,193,0.2));
border-color: var(--color-input-disabled-bg,rgba(175,184,193,0.2));
}

Expand Down Expand Up @@ -3003,7 +3003,7 @@ exports[`snapshots renders a single select input 1`] = `
.c3[aria-disabled] [data-component="ActionList.Checkbox"],
.c3[data-inactive] [data-component="ActionList.Checkbox"] {
cursor: not-allowed;
background-color: var(--color-input-disabled-bg,rgba(175,184,193,0.2));
background-color: var(--control-bgColor-disabled,rgba(175,184,193,0.2));
border-color: var(--color-input-disabled-bg,rgba(175,184,193,0.2));
}

Expand Down Expand Up @@ -3470,7 +3470,7 @@ exports[`snapshots renders with a custom text input component 1`] = `
.c3[aria-disabled] [data-component="ActionList.Checkbox"],
.c3[data-inactive] [data-component="ActionList.Checkbox"] {
cursor: not-allowed;
background-color: var(--color-input-disabled-bg,rgba(175,184,193,0.2));
background-color: var(--control-bgColor-disabled,rgba(175,184,193,0.2));
border-color: var(--color-input-disabled-bg,rgba(175,184,193,0.2));
}

Expand Down
Loading