diff --git a/.changeset/early-monkeys-drive.md b/.changeset/early-monkeys-drive.md new file mode 100644 index 0000000000..2d8245f178 --- /dev/null +++ b/.changeset/early-monkeys-drive.md @@ -0,0 +1,5 @@ +--- +'@backstage/plugin-rollbar': patch +--- + +Added an optional ESLint rule - no-top-level-material-ui-4-imports -in rollbar plugin which has an auto fix function to migrate the imports and used it to migrate the Material UI imports for plugins/rollbar. diff --git a/plugins/rollbar/.eslintrc.js b/plugins/rollbar/.eslintrc.js index e2a53a6ad2..9d5b45a010 100644 --- a/plugins/rollbar/.eslintrc.js +++ b/plugins/rollbar/.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/rollbar/src/components/RollbarTopItemsTable/RollbarTopItemsTable.tsx b/plugins/rollbar/src/components/RollbarTopItemsTable/RollbarTopItemsTable.tsx index 89fa7596b0..c6eb8888ab 100644 --- a/plugins/rollbar/src/components/RollbarTopItemsTable/RollbarTopItemsTable.tsx +++ b/plugins/rollbar/src/components/RollbarTopItemsTable/RollbarTopItemsTable.tsx @@ -14,8 +14,9 @@ * limitations under the License. */ -import { Box, Typography } from '@material-ui/core'; -import { Alert } from '@material-ui/lab'; +import Box from '@material-ui/core/Box'; +import Typography from '@material-ui/core/Typography'; +import Alert from '@material-ui/lab/Alert'; import React from 'react'; import { RollbarFrameworkId,