Add ESLint Rule to Sentry Plugin

Signed-off-by: Aditya Kumar <aditya.kumar60@infosys.com>
This commit is contained in:
Aditya Kumar
2024-03-19 13:38:41 +05:30
parent eb67f52c08
commit 2df7265f0e
5 changed files with 15 additions and 4 deletions
+5
View File
@@ -0,0 +1,5 @@
---
'@backstage/plugin-sentry': patch
---
Added ESLint rule `no-top-level-material-ui-4-imports` in the `sentry` 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',
},
});
+1 -1
View File
@@ -17,7 +17,7 @@
import { Entity } from '@backstage/catalog-model';
import { createDevApp, EntityGridItem } from '@backstage/dev-utils';
import { EntityProvider } from '@backstage/plugin-catalog-react';
import { Grid } from '@material-ui/core';
import Grid from '@material-ui/core/Grid';
import React from 'react';
import {
EntitySentryCard,
@@ -16,7 +16,7 @@
import React from 'react';
import { SentryIssue } from '../../api';
import { Typography } from '@material-ui/core';
import Typography from '@material-ui/core/Typography';
import { makeStyles } from '@material-ui/core/styles';
import { Link } from '@backstage/core-components';
@@ -22,7 +22,9 @@ import { ErrorGraph } from '../ErrorGraph/ErrorGraph';
import { Table, TableColumn } from '@backstage/core-components';
import Select from '@material-ui/core/Select';
import { Options } from '@material-table/core';
import { FormControl, Grid, MenuItem } from '@material-ui/core';
import FormControl from '@material-ui/core/FormControl';
import Grid from '@material-ui/core/Grid';
import MenuItem from '@material-ui/core/MenuItem';
const ONE_DAY_IN_MILLIS = 86400000;
const SEVEN_DAYS_IN_MILLIS = ONE_DAY_IN_MILLIS * 7;