Added Material UI 4 import rule to plugins/dynatrace

Signed-off-by: Aditya Kumar <aditya.kumar60@infosys.com>
This commit is contained in:
Aditya Kumar
2024-03-14 14:01:26 +05:30
parent c7957d5a9d
commit e550b2b274
4 changed files with 12 additions and 3 deletions
+5
View File
@@ -0,0 +1,5 @@
---
'@backstage/plugin-dynatrace': patch
---
Added an optional ESLint rule - no-top-level-material-ui-4-imports -in dynatrace plugin which has an auto fix function to migrate the imports and used it to migrate the Material UI imports for plugins/dynatrace.
+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',
},
});
@@ -14,7 +14,7 @@
* limitations under the License.
*/
import React from 'react';
import { Grid } from '@material-ui/core';
import Grid from '@material-ui/core/Grid';
import { Page, Content } from '@backstage/core-components';
import {
useEntity,
@@ -18,7 +18,7 @@ import React from 'react';
import useAsync from 'react-use/lib/useAsync';
import { Progress, ResponseErrorPanel } from '@backstage/core-components';
import { useApi } from '@backstage/core-plugin-api';
import { Chip } from '@material-ui/core';
import Chip from '@material-ui/core/Chip';
import { dynatraceApiRef } from '../../../api';
type SyntheticsLocationProps = {