Merge pull request #24249 from cftad/org-react

Add ESLint Rule to Org React
This commit is contained in:
Fredrik Adelöw
2024-04-13 21:59:42 +02:00
committed by GitHub
3 changed files with 13 additions and 2 deletions
+5
View File
@@ -0,0 +1,5 @@
---
'@backstage/plugin-org-react': patch
---
Added the `no-top-level-material-ui-4-imports` ESLint rule to aid with the migration to Material UI v5
+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,9 @@
*/
import React from 'react';
import { makeStyles, Typography, Button } from '@material-ui/core';
import Typography from '@material-ui/core/Typography';
import Button from '@material-ui/core/Button';
import { makeStyles } from '@material-ui/core/styles';
import KeyboardArrowDownIcon from '@material-ui/icons/KeyboardArrowDown';
import PeopleIcon from '@material-ui/icons/People';