diff --git a/.changeset/slimy-panthers-yawn.md b/.changeset/slimy-panthers-yawn.md new file mode 100644 index 0000000000..d327364e81 --- /dev/null +++ b/.changeset/slimy-panthers-yawn.md @@ -0,0 +1,5 @@ +--- +'@backstage/plugin-github-deployments': minor +--- + +Added ESLint rule `no-top-level-material-ui-4-imports` in the `github-deployments` plugin to migrate the Material UI imports. diff --git a/plugins/github-deployments/.eslintrc.js b/plugins/github-deployments/.eslintrc.js index e2a53a6ad2..a2d8179106 100644 --- a/plugins/github-deployments/.eslintrc.js +++ b/plugins/github-deployments/.eslintrc.js @@ -1 +1,5 @@ -module.exports = require('@backstage/cli/config/eslint-factory')(__dirname); +module.exports = require('@backstage/cli/config/eslint-factory')(__dirname, { + rules: { + '@backstage/no-top-level-material-ui-4-imports': 'error', + }, +}); diff --git a/plugins/github-deployments/src/components/GithubDeploymentsTable/GithubDeploymentsTable.tsx b/plugins/github-deployments/src/components/GithubDeploymentsTable/GithubDeploymentsTable.tsx index 61295abff0..3f37646656 100644 --- a/plugins/github-deployments/src/components/GithubDeploymentsTable/GithubDeploymentsTable.tsx +++ b/plugins/github-deployments/src/components/GithubDeploymentsTable/GithubDeploymentsTable.tsx @@ -15,7 +15,8 @@ */ import React from 'react'; import { GithubDeployment } from '../../api'; -import { Typography, makeStyles } from '@material-ui/core'; +import Typography from '@material-ui/core/Typography'; +import { makeStyles } from '@material-ui/core/styles'; import SyncIcon from '@material-ui/icons/Sync'; import { columnFactories } from './columns'; import { defaultDeploymentColumns } from './presets'; diff --git a/plugins/github-deployments/src/components/GithubDeploymentsTable/columns.tsx b/plugins/github-deployments/src/components/GithubDeploymentsTable/columns.tsx index 5dffdd9089..04208f3b39 100644 --- a/plugins/github-deployments/src/components/GithubDeploymentsTable/columns.tsx +++ b/plugins/github-deployments/src/components/GithubDeploymentsTable/columns.tsx @@ -17,7 +17,8 @@ import React from 'react'; import { GithubDeployment } from '../../api'; import { DateTime } from 'luxon'; -import { Box, Typography } from '@material-ui/core'; +import Box from '@material-ui/core/Box'; +import Typography from '@material-ui/core/Typography'; import { StatusPending, StatusRunning,