Added @backstage/no-top-level-material-ui-4-imports rule to plugins/airbrake

Signed-off-by: Aditya Kumar <aditya.kumar60@infosys.com>
This commit is contained in:
Aditya Kumar
2024-03-13 09:33:30 +05:30
parent a084691332
commit 31d58ae7e4
4 changed files with 14 additions and 3 deletions
+5
View File
@@ -0,0 +1,5 @@
---
'@backstage/plugin-airbrake': patch
---
added an optional ESLint rule - no-top-level-material-ui-4-imports - which has an auto fix function to migrate the imports and using it migrated the 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',
},
});
@@ -14,7 +14,8 @@
* limitations under the License.
*/
import React from 'react';
import { makeStyles, TextField } from '@material-ui/core';
import TextField from '@material-ui/core/TextField';
import { makeStyles } from '@material-ui/core/styles';
import { Context } from '../ContextProvider';
const useStyles = makeStyles(theme => ({
@@ -22,7 +22,8 @@ import {
Progress,
} from '@backstage/core-components';
import { useApi } from '@backstage/core-plugin-api';
import { Grid, Typography } 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 React from 'react';
import useAsync from 'react-use/lib/useAsync';