Added Material UI 4 import rule to plugins/apollo-explorer

Signed-off-by: Aditya Kumar <aditya.kumar60@infosys.com>
This commit is contained in:
Aditya Kumar
2024-03-13 14:33:41 +05:30
parent a084691332
commit bb9e31efef
3 changed files with 14 additions and 2 deletions
+5
View File
@@ -0,0 +1,5 @@
---
'@backstage/plugin-apollo-explorer': patch
---
Added an optional ESLint rule - no-top-level-material-ui-4-imports -in apollo-explorer plugin which has an auto fix function to migrate the imports and used it to migrate the Material UI imports for plugins/apollo-explorer.
+5 -1
View File
@@ -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',
},
});
@@ -15,7 +15,10 @@
*/
import React, { useState } from 'react';
import { Divider, makeStyles, Tab, Tabs } from '@material-ui/core';
import Divider from '@material-ui/core/Divider';
import Tab from '@material-ui/core/Tab';
import Tabs from '@material-ui/core/Tabs';
import { makeStyles } from '@material-ui/core/styles';
import { JSONObject } from '@apollo/explorer/src/helpers/types';
import { ApolloExplorer } from '@apollo/explorer/react';
import { Content } from '@backstage/core-components';