Add ESLint Rule to KubernetesCluster Plugin

Signed-off-by: Aditya Kumar <aditya.kumar60@infosys.com>
This commit is contained in:
Aditya Kumar
2024-03-21 12:27:54 +05:30
parent 5dc11788eb
commit 1c1140e516
6 changed files with 18 additions and 6 deletions
+5
View File
@@ -0,0 +1,5 @@
---
'@backstage/plugin-kubernetes-cluster': patch
---
Added ESLint rule `no-top-level-material-ui-4-imports` in the `kubernetes-cluster` plugin to migrate the Material UI imports.
+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',
},
});
@@ -19,7 +19,7 @@ import { useEntity } from '@backstage/plugin-catalog-react';
import { Table, TableColumn } from '@backstage/core-components';
import { IAPIGroup } from '@kubernetes-models/apimachinery/apis/meta/v1';
import { useKubernetesClusterError } from '../KubernetesClusterErrorContext/KubernetesClusterErrorContext';
import { makeStyles } from '@material-ui/core';
import { makeStyles } from '@material-ui/core/styles';
const useStyles = makeStyles(theme => ({
empty: {
@@ -17,8 +17,8 @@ import React, { useCallback, useEffect } from 'react';
import { InfoCard, StructuredMetadataTable } from '@backstage/core-components';
import { useEntity } from '@backstage/plugin-catalog-react';
import { useCluster } from './useCluster';
import { Skeleton } from '@material-ui/lab';
import { Theme, createStyles, makeStyles } from '@material-ui/core';
import Skeleton from '@material-ui/lab/Skeleton';
import { Theme, createStyles, makeStyles } from '@material-ui/core/styles';
import { useKubernetesClusterError } from '../KubernetesClusterErrorContext/KubernetesClusterErrorContext';
const useStyles = makeStyles((_theme: Theme) =>
@@ -15,7 +15,8 @@
*/
import React from 'react';
import { ApiResources } from '../ApiResources/ApiResources';
import { Grid, Typography } from '@material-ui/core';
import Grid from '@material-ui/core/Grid';
import Typography from '@material-ui/core/Typography';
import { Nodes } from '../Nodes/Nodes';
import { ClusterOverview } from '../ClusterOverview';
import {
@@ -22,7 +22,9 @@ import {
TableColumn,
} from '@backstage/core-components';
import { INode } from 'kubernetes-models/v1';
import { Grid, Typography, makeStyles } from '@material-ui/core';
import Grid from '@material-ui/core/Grid';
import Typography from '@material-ui/core/Typography';
import { makeStyles } from '@material-ui/core/styles';
import { useKubernetesClusterError } from '../KubernetesClusterErrorContext/KubernetesClusterErrorContext';
import { KubernetesDrawer } from '@backstage/plugin-kubernetes-react';