diff --git a/.changeset/nasty-radios-cheat.md b/.changeset/nasty-radios-cheat.md new file mode 100644 index 0000000000..00726388ce --- /dev/null +++ b/.changeset/nasty-radios-cheat.md @@ -0,0 +1,5 @@ +--- +'@backstage/plugin-firehydrant': patch +--- + +Added ESLint rule `no-top-level-material-ui-4-imports` in the `firehydrant` plugin to migrate the Material UI imports. diff --git a/plugins/firehydrant/.eslintrc.js b/plugins/firehydrant/.eslintrc.js index e2a53a6ad2..c69a8f6aff 100644 --- a/plugins/firehydrant/.eslintrc.js +++ b/plugins/firehydrant/.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/firehydrant/src/components/ServiceDetailsCard/ServiceDetailsCard.tsx b/plugins/firehydrant/src/components/ServiceDetailsCard/ServiceDetailsCard.tsx index b6bfbcc13b..d96b902a89 100644 --- a/plugins/firehydrant/src/components/ServiceDetailsCard/ServiceDetailsCard.tsx +++ b/plugins/firehydrant/src/components/ServiceDetailsCard/ServiceDetailsCard.tsx @@ -16,12 +16,10 @@ import React, { useEffect, useState } from 'react'; import { DateTime } from 'luxon'; import { ServiceAnalytics } from '../ServiceAnalytics/ServiceAnalytics'; -import { - Box, - Button as MaterialButton, - Typography, - makeStyles, -} from '@material-ui/core'; +import Box from '@material-ui/core/Box'; +import MaterialButton from '@material-ui/core/MaterialButton'; +import Typography from '@material-ui/core/Typography'; +import { makeStyles } from '@material-ui/core/styles'; import ExitToAppIcon from '@material-ui/icons/ExitToApp'; import NotesIcon from '@material-ui/icons/Notes'; import WhatshotIcon from '@material-ui/icons/Whatshot';