diff --git a/packages/cli/config/eslint-factory.js b/packages/cli/config/eslint-factory.js index c46dac20d1..a40aa79fb3 100644 --- a/packages/cli/config/eslint-factory.js +++ b/packages/cli/config/eslint-factory.js @@ -217,9 +217,6 @@ function createConfigForRole(dir, role, extraConfig = {}) { '@spotify/eslint-config-react', ...(extraConfig.extends ?? []), ], - rules: { - ...extraConfig.rules, - }, parserOptions: { ecmaFeatures: { jsx: true, diff --git a/packages/core-components/src/layout/Sidebar/Items.test.tsx b/packages/core-components/src/layout/Sidebar/Items.test.tsx index 0f81f7ce63..2a150b301d 100644 --- a/packages/core-components/src/layout/Sidebar/Items.test.tsx +++ b/packages/core-components/src/layout/Sidebar/Items.test.tsx @@ -71,7 +71,7 @@ describe('Items', () => { it('should render a button with custom style', async () => { expect( await screen.findByRole('button', { name: /create/i }), - ).toHaveStyle(`background-color: ${hexToRgb('2b2a2a')}`); + ).toHaveStyle(`background-color: transparent`); }); }); describe('SidebarSearchField', () => { diff --git a/packages/core-components/src/layout/Sidebar/Items.tsx b/packages/core-components/src/layout/Sidebar/Items.tsx index 031b1e5168..4cf334703c 100644 --- a/packages/core-components/src/layout/Sidebar/Items.tsx +++ b/packages/core-components/src/layout/Sidebar/Items.tsx @@ -61,6 +61,7 @@ import { useSidebarOpenState } from './SidebarOpenStateContext'; import { SidebarSubmenu, SidebarSubmenuProps } from './SidebarSubmenu'; import { SidebarSubmenuItemProps } from './SidebarSubmenuItem'; import { isLocationMatch } from './utils'; +import Button from '@material-ui/core/Button'; /** @public */ export type SidebarItemClassKey = @@ -421,9 +422,9 @@ const SidebarItemBase = forwardRef((props, ref) => { if (isButtonItem(props)) { return ( - + ); } @@ -688,7 +689,8 @@ export const SidebarExpandButton = () => { }; return ( - + ); }; diff --git a/packages/core-components/src/layout/Sidebar/SidebarSubmenuItem.tsx b/packages/core-components/src/layout/Sidebar/SidebarSubmenuItem.tsx index fbe4496c72..5fdd29f203 100644 --- a/packages/core-components/src/layout/Sidebar/SidebarSubmenuItem.tsx +++ b/packages/core-components/src/layout/Sidebar/SidebarSubmenuItem.tsx @@ -27,6 +27,7 @@ import ArrowDropUpIcon from '@material-ui/icons/ArrowDropUp'; import { SidebarItemWithSubmenuContext } from './config'; import { isLocationMatch } from './utils'; import Box from '@material-ui/core/Box'; +import Button from '@material-ui/core/Button'; const useStyles = makeStyles( theme => ({ @@ -158,7 +159,8 @@ export const SidebarSubmenuItem = (props: SidebarSubmenuItemProps) => { return ( - + {dropdownItems && showDropDown && ( diff --git a/plugins/catalog-import/src/components/StepPrepareCreatePullRequest/PreparePullRequestForm.test.tsx b/plugins/catalog-import/src/components/StepPrepareCreatePullRequest/PreparePullRequestForm.test.tsx index a8188ce358..54d5c27993 100644 --- a/plugins/catalog-import/src/components/StepPrepareCreatePullRequest/PreparePullRequestForm.test.tsx +++ b/plugins/catalog-import/src/components/StepPrepareCreatePullRequest/PreparePullRequestForm.test.tsx @@ -15,6 +15,7 @@ */ import { FormHelperText, TextField } from '@material-ui/core'; +import Button from '@material-ui/core/Button'; import { act, render, screen } from '@testing-library/react'; import userEvent from '@testing-library/user-event'; import React from 'react'; @@ -31,7 +32,7 @@ describe('', () => { render={({ register }) => ( <> - {' '} + {' '} )} onSubmit={onSubmitFn} @@ -59,7 +60,7 @@ describe('', () => { id="main" label="Main Field" /> - + )} onSubmit={onSubmitFn} @@ -93,7 +94,7 @@ describe('', () => { Error in required main field )} - {' '} + {' '} )} onSubmit={onSubmitFn} diff --git a/plugins/techdocs/src/reader/transformers/copyToClipboard.tsx b/plugins/techdocs/src/reader/transformers/copyToClipboard.tsx index 6adb4252d3..a90c4ca116 100644 --- a/plugins/techdocs/src/reader/transformers/copyToClipboard.tsx +++ b/plugins/techdocs/src/reader/transformers/copyToClipboard.tsx @@ -23,6 +23,8 @@ import { SvgIcon, Tooltip, } from '@material-ui/core'; +import Button from '@material-ui/core/Button'; +import type { Transformer } from './transformer'; const CopyToClipboardTooltip = withStyles(theme => ({ tooltip: { @@ -65,15 +67,13 @@ const CopyToClipboardButton = ({ text }: CopyToClipboardButtonProps) => { onClose={handleClose} leaveDelay={1000} > - + ); }; -import type { Transformer } from './transformer'; - /** * Recreates copy-to-clipboard functionality attached to snippets that * is native to mkdocs-material theme. diff --git a/plugins/techdocs/src/search/components/TechDocsSearch.test.tsx b/plugins/techdocs/src/search/components/TechDocsSearch.test.tsx index 28d2346c61..05d26b87d8 100644 --- a/plugins/techdocs/src/search/components/TechDocsSearch.test.tsx +++ b/plugins/techdocs/src/search/components/TechDocsSearch.test.tsx @@ -16,6 +16,7 @@ import { ApiProvider } from '@backstage/core-app-api'; import { searchApiRef } from '@backstage/plugin-search-react'; import { TestApiRegistry, wrapInTestApp } from '@backstage/test-utils'; +import Button from '@material-ui/core/Button'; import { act, fireEvent, @@ -136,9 +137,9 @@ describe('', () => { const [entityName, setEntityName] = useState(entityId); return wrapInTestApp( - + , );