diff --git a/.changeset/blue-bobcats-nail.md b/.changeset/blue-bobcats-nail.md new file mode 100644 index 0000000000..9dc27437fb --- /dev/null +++ b/.changeset/blue-bobcats-nail.md @@ -0,0 +1,5 @@ +--- +'@backstage/plugin-nomad': patch +--- + +Added an optional ESLint rule - no-top-level-material-ui-4-imports -in nomad plugin which has an auto fix function to migrate the imports and used it to migrate the Material UI imports for plugins/nomad. diff --git a/plugins/nomad/.eslintrc.js b/plugins/nomad/.eslintrc.js index e2a53a6ad2..9d5b45a010 100644 --- a/plugins/nomad/.eslintrc.js +++ b/plugins/nomad/.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', + }, + }); \ No newline at end of file diff --git a/plugins/nomad/src/components/EntityNomadJobVersionListCard/EntityNomadJobVersionListCard.tsx b/plugins/nomad/src/components/EntityNomadJobVersionListCard/EntityNomadJobVersionListCard.tsx index d7d200bce4..73d44acb3b 100644 --- a/plugins/nomad/src/components/EntityNomadJobVersionListCard/EntityNomadJobVersionListCard.tsx +++ b/plugins/nomad/src/components/EntityNomadJobVersionListCard/EntityNomadJobVersionListCard.tsx @@ -34,7 +34,7 @@ import { isNomadJobIDAvailable, } from '../../annotations'; import OpenInNewIcon from '@material-ui/icons/OpenInNew'; -import { Chip } from '@material-ui/core'; +import Chip from '@material-ui/core/Chip'; type rowType = Version & { nomadAddr: string };